Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have 2 options that I am aware of:</p> <p><strong>Option 1</strong> You can dig into the code that the flex compiler builds based on your MXML to see how it handles binding to static properties. There is a compiler directive called -keep-generated-actionscript that will cause generated files to stick around. Sleuthing through these can give you an idea what happens. This option will involve instantiating Binding objects and StaticPropertyWatcher objects.</p> <p><strong>Option 2</strong> There is staticEventDispatcher object that gets added at build time to classes containing static variables see this post <a href="http://thecomcor.blogspot.com/2008/07/adobe-flex-undocumented-buildin.html" rel="nofollow">http://thecomcor.blogspot.com/2008/07/adobe-flex-undocumented-buildin.html</a>. According to the post, this object only gets added based on the presence of static variables and not getter functions. </p> <p><strong>Example of Option 2</strong> Say we have a class named <strong>MyClassContainingStaticVariable</strong> with a static variable named <strong>MyStaticVariable</strong> and another variable someobject.somearrayproperty that we want to get updated whenever MyStaticVariable changes.</p> <pre><code>Class(MyClassContainingStaticVariable).staticEventDispatcher.addEventListener( PropertyChangeEvent.PROPERTY_CHANGE, function(event:PropertyChangeEvent):void { if(event.property == "MyStaticVariable") { someobject.somearrayproperty = event.newValue as Array; } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload