Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  PureMVC Manifold / MultiCore Version / Eclipse plugin for pureMVC on: November 11, 2009, 03:05:48
Does anyone know about a good eclipse plugin for developing pureMVC apps ?
2  PureMVC Manifold / MultiCore Version / event firing two times. on: November 04, 2009, 06:20:29
I have a proxy with a delegate class loading a xml file using HTTPService.
The proxy implements the IResponder interface and an instance of the proxy is passed to the delegate class.
My problem is that the proxy's result function is fired twice and the same with the fault function if the loading fails.
Anyone have any idea why ?

Proxy code:
        override public function onRegister():void
        {
            if (Log.isDebug())
                logger.debug("onRegister");
            var delegate:DefaultModuleLoaderDelegate = new DefaultModuleLoaderDelegate(this);
            delegate.loadModuleConfig();
        }

Delegate code:
        /**
         * Constructor.
         * @param responder IResponder from caller.
         */
        public function DefaultModuleLoaderDelegate(responder:IResponder)
        {
            if (Log.isDebug())
                logger.debug("Constructor");
            this.service = new HTTPService();
            this.service.contentType = HTTPService.CONTENT_TYPE_XML;
            this.service.url = XMLFILE;
            this.service.resultFormat = HTTPService.RESULT_FORMAT_E4X;
            this.responder = responder;
        }

        /**
         * Worker function. Responsible for loading xml file.
         */
        public function loadModuleConfig():void
        {
            if (Log.isDebug())
                logger.debug("loadModuleConfig");
            try
            {
                token = this.service.send();
                //Making sure the response is delegated upwards.
                token.addResponder(this.responder);
            }
            catch (error:Error)
            {
                if (Log.isError())
                    logger.error(error.getStackTrace());
                ExtendedAlert.showExtended("defaultmodule.xml is missing.", "Fatal error", 4, null, null, ExtendedAlert.ICON_ERROR48, 4);
            }
        }
Pages: [1]