This content has been marked as final. Show 3 replies
You need to make the static properties Bindable, which you can't in Flex 2. Unless you create a pattern to do so, or just use parentApplication.
Cairngorm has a Model pattern of producing Bindable model class instances through a Static class.
Another approach is to take your AS class of your properties do not make them static but include the file in the main mxml file. Make all the properties Bindable and then you can access them by parentApplication.someProperty.
Thank you for your reply, however, my problem is not with accessing and changing the values of the static properties. I'm able to change and receive the values from anywhere in the app, im just having trouble getting the canvas that dislays the info to update. I change the values with a click on a datagrid, which changes the values, then when the other canvas initilizes, it works fine. My problem is that when i change the values back in the first canvas AGAIN, the other canvas doesnt update b/c it had already been initialized, which triggers the appropriate functions to display the info. I did an alert on this page after changing the static props. a couple times, and it comes out perfect. I just dont know how to execute those functions again after they had already been initialized. I would like to do this maybe in the main app's script from the 'change' on the viewstack, but i cant seem to get to the canvas and change its properties throught that script. Or maybe some sort of 're-initialize'.. Does this make any sense?
Thanks again for any help
Yes I understand, it looks like you need to take another approach.
What controls are using the "initialized" variables? For example if it was a Label and the text attribute was bound to a property then when ever that property changed it would always show. Think in terms of binding not setting things through function.
Can you make a really small example code snippet so we are on the same page?