Tuesday, June 15, 2010

Flex Gotchas

1) Construtors cannot be private / protected / internal - They can only be public - use of public keyword is optional.

      a) Create a javascript function which makes use of xmlHTTPRequest object


             xmlHttpRequest.open("GET","http://serverName/URL",true); //true = sync, false = async

      b) Make the javascript function call which will invoke  this javascript function from within Flex using ExternalInterface class

               ExternalInterfac.call(javaScriptFunctionDefinitionStringWhichMakesTheXmlHTTPRequestCall); 

3) When should you use state change[ and transition] vs when should you replace the UI

You use state change when you have to just add or remove a few components in the view and controls pretty much remain the same.

You replace the UI when you have a completely new set of controls 

4) What happens when you removeChild() - parent reference is set to null

5)  When you set a specific height and width of a component, Flex does not call the measure() method, even if you explicitly call the invalidateSize() method. Flex calls the measure() method only if the explicitWidth property or the explicitHeight property of the component is NaN.



 



.

No comments:

Post a Comment