[flexcoders] Reference to View Stack Failing

2006-07-24 Thread Ethan Miller
Greetings - The following compiles fine, but at run time, when the function gets called, I get a null object reference error for demandStack. I've tried a fully-qualified path to demand stack as well... Any ideas? thanks, ethan mx:Script ![CDATA[ public function

Re: [flexcoders] Reference to View Stack Failing

2006-07-24 Thread Rob Rusher
Are the custom components used from the demand namespace containers?ViewStack requires them to be container components.Make sure all of the components used in the ViewStack extend a container component. That should solve your problem Regards,Rob RusherOn 7/24/06, Ethan Miller [EMAIL PROTECTED]

Re: [flexcoders] Reference to View Stack Failing

2006-07-24 Thread Ethan Miller
Yes, all the custom components are from the demand namespace and are Panels. They all load fine, it's the reference to the view stack itself that is failing,. Are the custom components used from the demand namespace containers? ViewStack requires them to be container components. Make sure

Re: [flexcoders] Reference to View Stack Failing

2006-07-24 Thread Rob Rusher
Sample:?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.adobe.com/2006/mxmlxmlns:demand=components.* mx:Script ![CDATA[ public function whatsNext(e:Event, next:String):void { if( next==tps ) { demandStack.selectedIndex=1; } } ]]/mx:Scriptmx:ViewStack id=demandStack

Re: [flexcoders] Reference to View Stack Failing

2006-07-24 Thread Jeff Tapper
it would probably be helpful if you sent a larger snippet of code. the error implies the view stack hasnt been created at the time the whatsNext method is called. So, this inherently leads to a few questions... How is the ViewStack instantiated? Is it a direct child of the Application? Is

Re: [flexcoders] Reference to View Stack Failing

2006-07-24 Thread Jeff Tapper
Rob - I was looking for an example of what Ethan was doing which wasnt working :) At 04:02 PM 7/24/2006, Rob Rusher wrote: Sample: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxmlhttp://www.adobe.com/2006/mxml; xmlns:demand=components.*