views:

224

answers:

1

I'm trying to set up the swiz framework in flex but cant seem to get it to compile. Im using swiz 0.6.2 and flex 3.0.2. The swc is in the libs directory of my flex project.

Im following the tutorial here: http://code.google.com/p/swizframework/wiki/DefiningApplicationComponents

and my code looks like:

Swiz.mxml--

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
                    layout="absolute" width="100%" height="100%"
                    preinitialize="onInitialize()">

    <mx:Script>
    <![CDATA[
            import org.swizframework.Swiz;

            private function onInitialize() : void {
                    // load up swiz beans
                    Swiz.loadBeans( [ Beans ] );
            }
    ]]>
 </mx:Script>

    <!-- rest of view -->

 </mx:Application>

Beans.mxml--

<?xml version="1.0" encoding="utf-8"?>
<BeanLoader xmlns="org.swizframework.util.*" xmlns:mx="http://www.adobe.com/2006/mxml"&gt;
    <!-- custom channel set -->
    <DynamicChannelSet id="myAmfChannel">
            <serverPort>8080</serverPort>
            <contextRoot>/demo-web</contextRoot>
    </DynamicChannelSet>

    <!-- user service --> 
    <mx:RemoteObject id="userService" 
                              destination="userService" 
                              channelSet="{myAmfChannel}"/>
 </BeanLoader>

when i try to compile i get the error unidentified method loadBeans through a reference with static type Class. any thoughts?

A: 

figured it out. this is all old swiz syntax and the docs were outdated. a great tutorial for understanding the correct way is here : http://www.firemoss.com/index.cfm/2009/10/21/Swiz-in-20-minutes-video--byebye-boilerplate .

greg