Can SignalContext work within a FlexMobile project?

mike's Avatar

mike

13 Nov, 2012 12:31 PM

Has anyone tried to integrate SignalContext with a Flex mobile project? I've not been able to convert a project to mobile and would like to know if anyone has a working hello world using SignalContext.

Thanks

  1. Support Staff 1 Posted by Ondina D.F. on 13 Nov, 2012 06:20 PM

    Ondina D.F.'s Avatar

    I’ve just converted Joel’s RobotlegsSignalsCafe (http://joelhooks.com/2010/02/14/robotlegs-as3-signals-and-the-signa...) to mobile.
    I didn’t have time to adjust all the components to make the app look like the one for browser, but the signals work!

    So, either you’re having trouble with the mobile part, or, if you are an experienced mobile developer already, then maybe the libraries you’re using aren’t up to date.

  2. 2 Posted by mike on 13 Nov, 2012 08:42 PM

    mike's Avatar

    Hi thanks for looking at this. The problem we noticed was when attempting to debug on the device we got a blank screen. Do you have a link I can download and test it out on a device?

    thanks

  3. Support Staff 3 Posted by Ondina D.F. on 14 Nov, 2012 10:46 AM

    Ondina D.F.'s Avatar

    Hi admin,
    No problem.

    Do you have a link I can download and test it out on a device?

    I don’t know what you mean. If you mean an example, then you can use the one I’ve modified yesterday (see attachment), at your own risk ;)
    I can’t test it on a device, but, as I said, it works on the desktop.

    The problem we noticed was when attempting to debug on the device we got a blank screen.

    Have you tried to run a non-robotlegs application? If the blank screen appears in a non-rl app, I think it’s an air bug or something wrong with the sdk. At least I heard of such a bug a while ago.
    Please let me know if the attached example is working on a device or not.

    Ondina

  4. 4 Posted by mike on 14 Nov, 2012 11:08 AM

    mike's Avatar

    Thanks for your help , It looks fine from here now , I think my issue was converting a pure as3 project to flex mob Ile I needed to convert my components

    Sent from my HTC smartphone

    ----- Reply message -----
    From: "Ondina D.F." <[email blocked]>
    To: <[email blocked]>
    Subject: Can SignalContext work within a FlexMobile project? [Problems #677]
    Date: Wed, Nov 14, 2012 9:46 PM

  5. Support Staff 5 Posted by Ondina D.F. on 14 Nov, 2012 04:37 PM

    Ondina D.F.'s Avatar

    Glad you sorted it out.

  6. Ondina D.F. closed this discussion on 14 Nov, 2012 04:37 PM.

  7. mike re-opened this discussion on 15 Nov, 2012 11:13 PM

  8. 6 Posted by mike on 15 Nov, 2012 11:13 PM

    mike's Avatar

    Hi ondina. , I have looked at this a bit more and believe I still have a problem. The code sample above uses mxml as the main class , I am unable to get a pure hello world signal context demo running in an as3 mobile project or within a flex mobile project , when I debug a simple demo the context view is always null , would you be able to confirm that mxml is not needed to run signalcontext in a mobile project ?
    thanks for all your help
    Mike

  9. Support Staff 7 Posted by Ondina D.F. on 16 Nov, 2012 10:48 AM

    Ondina D.F.'s Avatar

    Hey Mike,

    Have you tried out my example and it didn’t work?
    Or, you mean when you initialize the context in actionscript instead of the declaration tag, it doesn’t work? If so, then look at the pasted code bellow from a pure as3 mobile app, that I just changed to make it work with SignalContext. When I debug it (as a desktop emulation), it works fine.
    I have to say, I don’t use the SignalCommandMap in my own projects, so, for the example I attached yesterday and the one I modified today I used the old libraries, provided by Joel in his example: as3-signals v 05, robotlegs 1.0.3. Maybe the SignalContext has some issues when combined with the newer versions of signals and rl?

    All I’ve done in the pure as3 mobile version was:
    Main

    public class AsMobileSignals extends Sprite
    {
        private var context:ApplicationSignalContext;
        public function AsMobileSignals()
        {
            super();            
            // support autoOrients
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            addEventListener(Event.ADDED_TO_STAGE, onViewAdded);
        }
        protected function onViewAdded(event:Event):void
        {
            context = new ApplicationSignalContext(this);
        }
    }
    

    Context

    public class ApplicationSignalContext extends SignalContext
    {
        private var _view:Object;
    
        public function ApplicationSignalContext(contextView:DisplayObjectContainer = null, autoStartup:Boolean = true)
        {
            _view = contextView;            
            super(contextView, autoStartup);
        }
    
        override public function startup():void
        {
            signalCommandMap.mapSignalClass(DoSomethingSignal, DoSomethingCommand);
        }
    

    Does this help?

    Cheers,
    Ondina

  10. Support Staff 8 Posted by Ondina D.F. on 20 Nov, 2012 10:09 AM

    Ondina D.F.'s Avatar

    Mike, you can re-open this discussion, if need be.

  11. Ondina D.F. closed this discussion on 20 Nov, 2012 10:09 AM.

  12. mike re-opened this discussion on 20 Nov, 2012 10:38 AM

  13. 9 Posted by mike on 20 Nov, 2012 10:38 AM

    mike's Avatar

    Thanks once again , the enter_frame check was missing in my sample ,.oddly this.doesn't seem to matter with flash professional projects. Anyway its underway cheers!

  14. Support Staff 10 Posted by Ondina D.F. on 20 Nov, 2012 11:20 AM

    Ondina D.F.'s Avatar

    no problem:) glad you solved it.
    Cheers,
    Ondina

  15. Ondina D.F. closed this discussion on 20 Nov, 2012 11:20 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac