[flexcoders] Re: binding ViewStack.selectedChild to the data model
Yes I believe you're right, that would be a one-time assignment and not a binding. Since you'd have to create that binding in AS code, it's possible there isn't an easy solution. Sorry I don't have a better answer at the moment. --- In flexcoders@yahoogroups.com, jrjazzman23 [EMAIL PROTECTED] wrote: thanks. I successfully switched to using selectedIndex. Curious though, would the solution you provided create a binding? Seems like it might be a one-time assignment to selectedChild and not receive updates. --- In flexcoders@yahoogroups.com, Doug Lowder douglowder@ wrote: 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 jrjazzman23@ 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 ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/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/
[flexcoders] Re: binding ViewStack.selectedChild to the data model
thanks. I successfully switched to using selectedIndex. Curious though, would the solution you provided create a binding? Seems like it might be a one-time assignment to selectedChild and not receive updates. --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: 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 jrjazzman23@ 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 -- 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/
[flexcoders] Re: binding ViewStack.selectedChild to the data model
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/