Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How can I cause a Prototype bean to be destroyed when a view is destroyed?Swiz can't know what else you may have done with the Prototype, so it is not automatically torn down. If you wish to tear down a Prototype bean when a view is removed, implement a
Why aren't new PopUp or AIR windows processed by Swiz (especially if created from within a Module)?Because PopUps and NativeWindows are not part of the standard display list, Swiz has no way to know which Swiz instance is the owner of the window. To deal with this, you can have the class that creates the window implement
Why aren't bubbling events dispatched from a PopUp handled by Swiz?Swiz uses the display object where it was created as its "root event dispatcher", and it listens for events on that event dispatcher. However, PopUps are not added to this display list, they are added as direct children of the SystemManager object, since they must appear above everything else in the application. As a result, events dispatched from PopUps don't bubble up to the Swiz dispatcher. However, the solution to this is simple: just use
Where is my application logic starting point?If your startup logic only involves one bean, let that bean (probably a "main controller") implement IInitializingBean, or decorate a method with If your startup logic depends on events that must be handled by other beans, you need to be sure that all of your beans have been properly set up. In this case, you can use an event handler method such as
How should I dispatch events from bean classes?You should inject a dispatcher using the
Why did my view not get injections processed?Be sure that the viewPackages in the
I defined a WebService object in my Beans.mxml, but my web service calls don't seem to work. What's wrong?The Flex WebService class actually has two implementations, one for MXML and one for AS3. If you define a WebService within a UIComponent, the Flex framework automatically triggers a load of the web service's WSDL in the UIComponent's creationComplete() handler. However, the AS3 version does not (it has no creationComplete() handler). Because the BeanProvider is not a UIComponent, this automatic loading of the WSDL is not done by the Flex framework. As a result, you must call loadWSDL() on your web service before you can use it, because you are actually using the WebService's AS3 implementation.
Why do I get an error when using Swiz in a Flash Builder project when I use Design View?Researching this seems to indicate that it can happen with any .swc where the .swc was compiled using a version of the SDK other than the version used by the project. Since there are so many possible SDK versions, creating separate versions of Swiz for all of them is not possible. If you need to use Design View, and you're using an SDK other than the one the framework was compiled with, we recommend that you download the source code, set up the framework as a library project, and add the library project to your application project. This should resolve the Design View error.
|
Page Comparison
General
Content
Integrations