|
Don’t put the semi-colon in a
binding _expression_ (though I don’t think it should be a problem).
Binding should take care of the class not being initialized yet (if you mean
myActionscriptClass hasn’t been assigned to anything). If the problem is
that myActionsciptClass exists but getData() isn’t returning anything
useful you will need to add a [ChangeEvent] to the getData() function and then
dispatch that even to indicate it can fire. This should address Ben’s comments
too: Binding and functions (by Matt Chotin) When you use a function in a binding
_expression_ binding will always look at the parameters to the function, and if
any of the parameters changes the function will re-execute. Additionally if
the reference to the object that is holding the function changes we will
re-execute (this is just like a property binding obviously). I don’t know
if the docs mention it, but you can also add a [ChangeEvent] to your function.
When the instance of your class dispatches that event, we will also re-execute
the function. So if you have a function that you want binding to execute after
creationComplete you could put [ChangeEvent(“creationComplete”)] on
top of the function declaration. HTH, Matt From: erik katerborg
[mailto:[EMAIL PROTECTED] hi, This may be a beginner's question but I just can't figure
one thing out: how to send dynamic data to a custom flex component. what I want to do is the following: <myCustomSWC
myDataToBeUsed="{myActionscriptClass.getData();}" /> the problem is that the function is not executed but simply
passed as a string to the component. Another problem is that the actionscript
class may not have initialised yet so the function would not work at all. does anyone have a suggestion on how to do this ??? thanks very much !!! a confused flex coder, erik.
Yahoo! Groups Links
|

