RE: [flexcoders] Help setting the selectedChild of a viewstack

2009-11-24 Thread Alex Harui
Try:

this[o.view]

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of lanekelly5
Sent: Monday, November 23, 2009 2:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help setting the selectedChild of a viewstack



I'm trying to grab a portion of the BrowserManager.fragment (I bring it in as 
an object) and then use it to set the selectedChild of a ViewStack. I'm running 
into a type conversion error.

Essentially this is what I'm trying to do:

o.view contains the portion of my fragment - say it is set to sytems with 
(.../index.html#view=systems)

var o:Object = URLUtil.stringToObject(browserManager.fragment);

I then try to set the selectedChild of my ViewStack with:

myVS.selectedChild = o.view;

I get the following:
TypeError: Error #1034: Type Coercion failed: cannot convert sytems to 
mx.core.Container.

I'm not sure how to make this work. Any thoughts?

Thanks.



[flexcoders] Help setting the selectedChild of a viewstack

2009-11-23 Thread lanekelly5
I'm trying to grab a portion of the BrowserManager.fragment (I bring it in as 
an object) and then use it to set the selectedChild of a ViewStack.  I'm 
running into a type conversion error.

Essentially this is what I'm trying to do:

o.view contains the portion of my fragment - say it is set to sytems with 
(.../index.html#view=systems)

var o:Object = URLUtil.stringToObject(browserManager.fragment);

I then try to set the selectedChild of my ViewStack with:

myVS.selectedChild = o.view;

I get the following:
TypeError: Error #1034: Type Coercion failed: cannot convert sytems to 
mx.core.Container.

I'm not sure how to make this work.  Any thoughts?

Thanks.