Google Groups

Re: Using MobileApplication to share data with first view


Raymond Camden Nov 16, 2010 1:30 PM
Posted in group: Adobe AIR for Devices
Ok, I think I got it.

Apparently you can specify both a first view and the _data_ for the
first view. So I returned this to my mobileApplication tag:

                                         firstView="views.TaskRunHome"

Then in my init function, I did this:

                var ob:Object = new Object();
                ob.dbfile = dbfile;
                navigator.firstViewData = ob;

I'm not saying this is best practice - just what worked. ;) My init
function root ran and did it's crap, and I was then able to pass this
on to the first view.


On Tue, Nov 16, 2010 at 3:23 PM, Raymond Camden <rca...@gmail.com> wrote:
> Hmpth, this doesn't quite work from the mobile app root;
>
>                navigator.pushView(views.TaskRunHome);
>
> Gives me a null ref error in SlideViewTranslation.
>
>
> On Tue, Nov 16, 2010 at 3:11 PM, Raymond Camden <rca...@gmail.com> wrote:
>> So when using views in a Flex Hero mobile application, you can very
>> easily load a view and pass data along to the next view. I love that.
>> I'm trying to do the same but via the top level component. What I mean
>> is - my root MobileApplication has an initialize method. I want to
>> create a variable in there and when my first view is automatically
>> loaded for me, I want to pass the data to it.
>>
>> I guess if I removed firstView I could simply load the view myself?
>>
>>
>> --
>> ===========================================================================
>> Raymond Camden, ColdFusion Jedi Master
>>
>> Email    : r...@camdenfamily.com
>> Blog      : www.coldfusionjedi.com
>> AOL IM : cfjedimaster
>>
>> Keep up to date with the community: http://www.coldfusionbloggers.org
>>
>
>
>
> --
> ===========================================================================
> Raymond Camden, ColdFusion Jedi Master
>
> Email    : r...@camdenfamily.com
> Blog      : www.coldfusionjedi.com
> AOL IM : cfjedimaster
>
> Keep up to date with the community: http://www.coldfusionbloggers.org
>

--
===========================================================================
Raymond Camden, ColdFusion Jedi Master

Email    : r...@camdenfamily.com
Blog      : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with the community: http://www.coldfusionbloggers.org