Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Closed Thread
Thread Tools Rate Thread Display Modes
Old 11-22-2011, 08:11 AM   #1
Registered User
Join Date: Nov 2011
Posts: 4
Default using the navigator property of View components

Hey there,
for my application, I have these three files (in addition to other files):

In my Orders file I have defined two states: list and make.

So, I include my MakeAnOrder and ListAllOrders views (components) as follows:
<myPackage:MakeAnOrder includeIn="make"/>
<myPackage:ListAllOrders includeIn="list"/>
inside my Orders file.

Now, inside MakeAnOrder I have a button that invokes navigator.pushView(someView);, but it won't work. the error I get is that the navigator is null.

One way I circumvented this issue is by putting the button in Orders file and defining its' clickHandler in Orders file, but making it visible only in 'make' state. This worked fine functionally, but it complicates maintenance of code?

is there any other way to do this better?

Thank you for your reply.
bibiki is offline  
Old 11-22-2011, 04:05 PM   #2
Senior Member
solisarg's Avatar
Join Date: Mar 2003
Location: Buenos Aires, Argentina
Posts: 496

Are MakeAnOrder and ListAllOrders s:View, I mean View classes?

solisarg is offline  
Old 11-23-2011, 09:55 AM   #3
Registered User
Join Date: Nov 2011
Posts: 4

yes Jorge,
they are both View classes.

I circumvented the problem now making a field variable (ordersMain) inside my MakeAnOrder that is set equal to my Orders object upon the creation of MakeAnOrder.

now, when I want to pushView from MakeAnOrder, instead of writing navigator.pushView(some view), I do ordersMain.navigator.pushView(some view)

this does make things work properly.

if you perhaps have a better way, let me know. else, I'm marking this thread solved.

thank you for trying to help.
bibiki is offline  
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:00 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.