| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Fried Onions
|
I'm working on a wizard for a component and I'm having problems clearing a parameter of type array. I've just started learning JSFL tonight, so it could certainly be a misunderstanding of the DOM : )
Here's the code that doesn't work: PHP Code:
|
|
|
|
|
|
#2 |
|
ruby on rails fan :)
|
Strangely enough, I can't get any code to execute after that line. Are you having that issue, too, or am I just screwing something else up? (I don't really have a proper component to test on here)
|
|
|
|
|
|
|
|
|
#3 |
|
Fried Onions
|
Nope, you're right. can't even fl.trace anything : ) if you comment the removeItem() line then it works fine.
Great, I love clearing large component parameter arrays manually every time I run the script :b |
|
|
|
|
|
#4 |
|
ruby on rails fan :)
|
This is weird. I really wish it would just throw an error.
I have managed to make it silently quit with just a trace, too. The example I'm working on chokes when trying to trace the value of the parameter's listIndex. |
|
|
|
|
|
#5 |
|
Fried Onions
|
well, after working on some other jsfl code I've noticed that when I tried to user the insertItem() method on a non-array/object parameter it silently failed as well. After pointing it to the proper parameter the script ran again.
This may mean that I'm simply doing something wrong with regaurds to removeItem (although I can't see how that would be). Either way silently failing is wack : ( |
|
|
|
|
|
#6 |
|
Fried Onions
|
For anyone interested, I found a workaround. It seems to be impossible to return the array/object parameter to an empty state -- I can, however, use removeItem at the index 1. So use this:
PHP Code:
drawArray.value[0].value = "your param value"; then use drawArray.insertItem() as you would normally. It works, that's all I can ask for right now ^_^ |
|
|
|
|
|
#7 |
|
lala
Join Date: Feb 2002
Location: on the road
Posts: 2,859
|
thanks for the sollution
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|