The docs say selectedChild can only be set in AS, not MXML. Maybe try something like:
creationComplete="viewstack1.selectedChild = ModelLocator.getInstance ().selectedView" --- In flexcoders@yahoogroups.com, "jrjazzman23" <[EMAIL PROTECTED]> wrote: > > I think the binding is happening before the viewstack children are > initialized.. getting the following error when I run the prog: > > TypeError: Error #2007: Parameter child must be non-null. > > > ModelLocator snippet > --------------------------- > public var selectedView : Container; > > > > mainapp.mxml snippet > -------------------------- > <mx:ViewStack x="238" y="123" id="viewstack1" width="752" height="550" > creationPolicy="all" > selectedChild="{ModelLocator.getInstance().selectedView}" > > <Components:FindClient id="FindClientCanvas" /> > <Components:GeneralInformation id="GeneralInformationCanvas" /> > </mx:ViewStack> > > > > I've tried running the following from main app's initialize, > preinitialize and creationcomplete > --------------------------- > ModelLocator.initialize(); > ModelLocator.getInstance().selectedView = FindClientCanvas; > > > > How can I delay the binding until the viewstack and its children have > been created? > > thanks > ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/