Also you need to make sure that the class still gets linked into your app.  Create some dummy variables of the potential types that could be loaded:

 

Var linkhelper1:MyWindow1;

Var linkhelper2:MyWindow2;

 

Etc.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Friday, October 07, 2005 7:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] PopupManager.createPopUp - varying the className argument

 

Close!

var yourClass:String = "Pooki";
PopUpManager.createPopUp(this, _global[yourClass], false);

----- Original Message -----
From: "Derrick Grigg" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Friday, October 07, 2005 10:04 AM
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className
argument


Tried the string idea, no luck. The switch/if looks like the only way. I was
hoping not to have to do that since I want to have a lot of variability on
the user's window options but not luck apparenetly.

Thanks.

________________________________

From: flexcoders@yahoogroups.com on behalf of Mink, Joseph
Sent: Fri 07/10/2005 9:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className
argument


I would guess you could use a string...like, instead of ...createPopUp(
_root, SomeClass, true, initObj, false ); maybe you could do createPopUp(
_root, "SomeClass", true, initObj, false );

But I would guess your best bet is to arrange your implementation in such a
way that you can just go through a few if-statements and based on your
user's input, execute the necessary call to createPopUp.

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of derrickgrigg
Sent: Friday, October 07, 2005 9:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopupManager.createPopUp - varying the className
argument


I have a instance where I want to vary the pop window that gets
created based on a user's selection. Instead of having to hard code in
the a seperate instance of:

var popup = mx.managers.PopUpManager.createPopUp( _root,
views.OptionX, true, initObj , false );

in a switch statement I would like to just be able to use a variable
for the className argument.

Ideally I would like to do the following:

var winClass = options_cmb.value;
var popup = mx.managers.PopUpManager.createPopUp( _root, winClass,
true, initObj, false );

I have tried unsuccessfully using a shared libray. Does anyone know if
this is even possible, and it so how I would go about it.






--
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



* Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> "
on the web.

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


________________________________





--
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








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to