I've also got a huge if-statement in my OpenWindowCommand, so the
opportunity to decrease the lines of code in that class was appealing.
I had the same thing happen (white background, then white screen) when
I tried the _global suggestion, though.

--- In flexcoders@yahoogroups.com, "Derrick Grigg" <[EMAIL PROTECTED]> wrote:
>
> Thanks Matt and Jester
>  
> No luck though. The background of my app goes white the first time
this function gets called, and the app completely disappears the
second time. If I put hard codeed class names in everything works. I
have come up another solution that seems to work. Each option that
calls the loadWin function is based on a class so instead of
dispatching an event to loadWin I am having the class use popupmanager
to open it's respective window.
>  
>  var win1: views.elements.image;
>  var win2: views.elements.swf;
>  var win3: views.elements.text;
>  
>  function loadWin(event){
>   var cn:String = "views.elements."+ event.target.type;
>   var initObj = {
>    helpButton: true,
>    stateButton: true,
>    resizeButton: true,
>    closeButton: true
>   }
>   var win = mx.managers.PopUpManager.createPopUp( _root,
_global[cn], true, initObj, false );     
>   win.centerPopUp(_root);
>  }
>  
> Thanks for the help though.
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com on behalf of Matt Chotin
> Sent: Fri 07/10/2005 10:44 AM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] PopupManager.createPopUp - varying the
className argument
> 
> 
> 
> 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:[EMAIL PROTECTED]
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:[EMAIL PROTECTED] 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
<http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
        Computer software development
<http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
        Software design and development
<http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
        
> Macromedia flex
<http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>
        Software development best practice
<http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
        
> 
> ________________________________
> 
> 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/> . 
> 
> 
> ________________________________
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/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/
 



Reply via email to