Robotlegs and Flex mobile startup problems

stephenadams1's Avatar

stephenadams1

19 Oct, 2011 08:52 PM

Hi,

I'm trying to create a Flex mobile app using Robotlegs, when I add the context to the main View I get this error message:

Description Resource Path Location Type
'com.realairsoftware.timeliner.context.TimelinerContext' is not assignable to the default property, 'navigationStack', of type 'spark.components.supportClasses.NavigationStack'. Timeliner.mxml /Timeliner/src line 9 Flex Problem

Looks like I can't add a context to the navigationStack, I was using the MXML tag to add the contact which caused this error.

Not sure how to add the context to a view stack mobile app.

Any ideas?

Stephen

  1. Support Staff 1 Posted by Ondina D.F. on 20 Oct, 2011 01:06 PM

    Ondina D.F.'s Avatar

    Hi Stephen,

    I'm a newbie when it comes to mobile applications, so hopefully I’m not misunderstanding your question.

    The NavigationStack is internally used by the ViewNavigator, that’s why I think you are actually referring to the ViewNavigator.
    It is possible to use the ViewNavigator as the contextView of your application, if you need to. Like this:

    https://gist.github.com/1301060

    or like this:

    https://gist.github.com/1301072

    However, I would use a main container as the contextView :
    Application or ViewNavigatorApplication or TabbedViewNavigatorApplication.

    https://gist.github.com/1301083

    I modified a simple project in order to make it work with the mobile TabbedViewNavigatorApplication (for iPad)

    If you want, you can take a look at it:
    https://github.com/Ondina/robotlegs-incremental/tree/master/robotle...

    an fxp is here:
    https://github.com/Ondina/robotlegs-incremental/blob/master/robotle...
    If you click on View Raw you can download it.

    Tell me if it helped solve your issue. If it didn’t, could you share some of your code with us?

    Cheers,
    Ondina

  2. 2 Posted by Michal Wroblews... on 21 Oct, 2011 11:57 AM

    Michal Wroblewski's Avatar

    I created a sample Flex Mobile project working with Robotlegs for my try {harder} presentation. I attached it.

  3. Support Staff 3 Posted by Ondina D.F. on 21 Oct, 2011 02:40 PM

    Ondina D.F.'s Avatar

    Hey Mike,

    thanks for sharing your example with us.
    I’ll surely take a look at it.
    Your example is probably addressing more aspects of a mobile application than my example, which was just a quick modification of a simple app in order to answer Stephen’s question.

    If you’d put it on github I could add it to the list :
    http://knowledge.robotlegs.org/discussions/examples/6-links-to-robo...

    I don’t know how many people find that list of examples, but I’m sure many are looking for mobile + rl applications demos, and as far as I know there aren’t many or any at all..
    Thanks,
    Ondina

  4. 4 Posted by Michal Wroblews... on 21 Oct, 2011 03:20 PM

    Michal Wroblewski's Avatar

    It's very basic example just showing Robotlegs setup with some RL elements.. I'm going to prepare a blog post introducing Flex Mobile and also mention Robotlegs setup there, I'll also share my slides from try {harder} then and will prepare better example application.

  5. Support Staff 5 Posted by Ondina D.F. on 21 Oct, 2011 03:36 PM

    Ondina D.F.'s Avatar

    That would be cool, Mike:)

    While updating the above mentioned list I found another mobile rl demo:
    http://www.blog.rivellomultimediaconsulting.com/posts/flexmobile-ro...
    I haven’t tried it yet. The source is on Google Code... Who uses that anymore? :P

  6. 6 Posted by stephenadams1 on 22 Oct, 2011 06:35 PM

    stephenadams1's Avatar

    Hi everyone,

    Again the wonderful Robotlegs community comes to my help, well the problem I had was that I didn't put my Context tag in the <fx:Declarations> tag, e.g.

    <fx:Declarations>

        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <context:TimelinerContext contextView="{this}" />
    </fx:Declarations>
    

    I'm going to look at the source code you have posted, it'll all help.

    Thanks

    Stephen

  7. Ondina D.F. closed this discussion on 01 Nov, 2011 11:44 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