Question

Je suis en train de mettre en place le cadre de Swiz flex mais cant semblent pour le compiler. Im en utilisant Swiz 0.6.2 et 3.0.2 flex. Le SWC est dans le répertoire libs de mon projet flex.

Im suivant le tutoriel ici: http://code.google.com/p / swizframework / wiki / DefiningApplicationComponents

et mon code ressemble à:

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">
    <!-- 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>

quand je tente de compiler j'obtiens l'erreur méthode loadBeans non identifiés par une référence à la classe de type statique. toute pensée?

Était-ce utile?

La solution

figured it out. cela est ancienne syntaxe Swiz et les docs sont pas à jour. un bon tutoriel pour comprendre la manière correcte est ici: http://www.firemoss.com/index.cfm/2009/10/21/Swiz-in-20-minutes-video--byebye-boilerplate .

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top