Hi Barry,

Sorry that the code isn't working out-of-the-box.  My popup is being launched from a Cairngorm command (see below).  I remember having to fiddle with the references quite a bit.  This example isn't really good Cairngorm coding since I'm referencing the application from the command, but it works.  Hopefully you will find the correct combination.

Cheers,
-TH

import com.ets.main.view.mainView.searching.SearchingPopupView;
import mx.managers.PopUpManager;
import mx.core.IFlexDisplayObject;
import flash.display.DisplayObject;
  
public class MyCommand implements Command
{
    public var popUpWindow:IFlexDisplayObject;

    public function execute(cairngormEvent:CairngormEvent):void
    {      
       var popUpParent:DisplayObject;
       popUpParent = Application.application.mainView.mainCanvas;
       popUpWindow = PopUpManager.createPopUp(popUpParent,ModelLocator.getInstance().searchingPopUpView,false);
       PopUpManager.centerPopUp(popUpWindow);
    }  
}

--- In flexcoders@yahoogroups.com, "barry.beattie" <[EMAIL PROTECTED]> wrote:
>
> you flamin' bewdie, Tim! thanx heaps.
> (and it makes sence too)
>
> but... almost there: can't get the right references
> "Access of undefined property NewPopUpParent"
>
> I think I've missed something, or using the wrong reference for the
> pop-up.
>
> import mx.core.Application; // for mainCanvas
> import flash.display.DisplayObject; // for NewPopUpParent?
>
> import mx.events.FlexEvent;
>
> // Import the PopUpManager.
> import mx.managers.PopUpManager;
> import mx.core.IFlexDisplayObject;
>
> public var searchWindow:IFlexDisplayObject;
> public var NewPopUpParent:DisplayObject;
>
> NewPopUpParent = Application.application.mainCanvas;
>
> // Additional import statement to use the TitleWindow container.
> import mx.containers.TitleWindow;
>
> private function showSearch():void {
> var searchWindow:TitleWindow =
> TitleWindow(PopUpManager.createPopUp(NewPopUpParent,
> AcademicSearchForm, true));
>
> // Add a close button.
> searchWindow.showCloseButton=true;
> // gets the parent to make it center (mainCanvas)
> PopUpManager.centerPopUp(searchWindow);
> }
>
> ======================================
> thanx again Tim, much appreciated.
> barry.b
>

__._,_.___

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