Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Is there a mailing list where I can get help from the Swiz community?

Absolutely, you can find the Swiz group at http://groups.google.com/group/swiz-framework

If I am building the Swiz framework from the source code, what compiler arguments do I need?
-keep-as3-metadata+=Inject,Autowire,Outject,Mediate,Dispatcher,PostConstruct,PreDestroy 
-namespace http://swiz.swizframework.org manifest.xml 
-include-namespaces http://swiz.swizframework.org
I try to access my autowired property during creationComplete but the reference is still null?

Swiz autowires the view on addedToStage which is after creationComplete. Autowire a setter function to have direct access to the injected reference.

I can’t use Autowire in my root Application container. What’s wrong?

Metadata can’t be used in the root Application container. It’s the only place where this is the case. But the solution is easy: Just create your own component to act as a parent view container, and add this as a child to the root Application. Swiz will autowire this component with no problems. So for example, something like this:

<mx:Application
       xmlns:mx   = "http://www.adobe.com/2006/mxml"
       xmlns:view = "view.*"
       xmlns:swiz="http://swiz.swizframework.org">

       <swiz:SwizConfig
               strict="false"
               id="config"
               mediateBubbledEvents="true"
               viewPackages="view"
               beanLoaders="{[Beans]}" />

       <!-- Autowiring will work fine in this child container. -->
       <view:MyApplicationContainer
               width  = "100%"
               height = "100" />

</mx:Application>
I tried to compile the library from the SVN source but get the error: “Access of undefined property flex4.”?

You are missing the conditional compilation flag: -define=CONFIG::flex4 true or false for older Flex versions.

Does Swiz work with Flex 4?

Yes, Swiz works with Flex 2,3 and 4.

Does Swiz work with Adobe AIR?

Yes, there is in general no difference between Web or AIR development.

I have dispatched an event from a view but the dynamic mediator is not invoked?

You have to set mediateBubbledEvents in the SwizConfig tag AND the bubble property of the event to true.

Where is my application logic starting point?

Let your main controller implement IInitializingBean and start with your application logic in the initialize method. Swiz calls initialize on these beans when the autowiring process is complete.

How should I dispatch events from bean classes?

You can either implement the IDispatcherBean interface or the BeanLoader also contains a protected dispatcher property which you can directly bind in the BeanLoader declaration of your classes.

Why did my view not get autowired?

Be sure that the viewPackages in the SwizConfig tag are set correctly.

Autowire and Mediate does not work with my own compiled version of Swiz?

You forgot the compiler flag -keep-as3-metadata+=Autowire,Mediate.

Autowire and Mediate does not work with my own compiled version of Swiz in release builds?

You have a space between -keep-as3-metadata and +=Autowire,Mediate.

Navigate space
  • No labels