Re: [flexcoders] Flex popup module ignores context menu

2012-02-21 Thread Adnan Doric

Thank you!

I just remembered the related bug:
https://bugs.adobe.com/jira/browse/SDK-25598

Cheers,
Adnan

On 21/02/2012 07:27, Alex Harui wrote:


Set mouseEnabled=true on the TitleWindow


On 2/20/12 3:29 AM, Adnan Doric astronaute@gmail.com wrote:






Hi all,

I followed the Alex's Popup Dialogs as Modules blog entry:
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html

It works with mx.containers.TitleWindow as intended, the context menu
shows and I can copy/paste text in a TextArea.

But if I try to use spark.components.TitleWindow, the context menu
does
not shows at all when right clicking in spark TextArea.

Application code:
?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx minWidth=955
minHeight=600

fx:Script
![CDATA[
 import mx.core.IVisualElement;
 import mx.events.ModuleEvent;
 import mx.modules.IModuleInfo;
 import mx.modules.ModuleManager;

private var info:IModuleInfo;

protected function loadModule(event:MouseEvent):void
 {
 info = ModuleManager.getModule(HelloModule.swf);
 info.addEventListener(ModuleEvent.READY, modEventHandler);
 info.load(null, null, null, moduleFactory);
 }

private function modEventHandler(event:ModuleEvent):void
 {
 addElement(info.factory.create() as IVisualElement);
 }

]]
/fx:Script

s:Button label=loadModule click=loadModule(event) /

/s:Application

module code:
?xml version=1.0 encoding=utf-8?
local:ModuleTitleWindow xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx
 xmlns:local=*
 width=400 height=300

s:TextArea width=100% height=100% /

/local:ModuleTitleWindow

package
{
 import spark.components.TitleWindow;

[Frame(factoryClass=mx.core.FlexModuleFactory)]
 public class ModuleTitleWindow extends TitleWindow
 {
 public function ModuleTitleWindow()
 {
 super();
 }
 }
}

Any thoughts? Is there a workaround?

Thank you





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui





[flexcoders] Flex popup module ignores context menu

2012-02-20 Thread Adnan Doric
Hi all,

I followed the Alex's Popup Dialogs as Modules blog entry:
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html

It works with mx.containers.TitleWindow as intended, the context menu 
shows and I can copy/paste text in a TextArea.

But if I try to use spark.components.TitleWindow, the context menu does 
not shows at all when right clicking in spark TextArea.

Application code:
?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx minWidth=955 
minHeight=600

fx:Script
![CDATA[
 import mx.core.IVisualElement;
 import mx.events.ModuleEvent;
 import mx.modules.IModuleInfo;
 import mx.modules.ModuleManager;

 private var info:IModuleInfo;

 protected function loadModule(event:MouseEvent):void
 {
 info = ModuleManager.getModule(HelloModule.swf);
 info.addEventListener(ModuleEvent.READY, modEventHandler);
 info.load(null, null, null, moduleFactory);
 }

 private function modEventHandler(event:ModuleEvent):void
 {
 addElement(info.factory.create() as IVisualElement);
 }

 ]]
/fx:Script

s:Button label=loadModule click=loadModule(event) /

/s:Application

module code:
?xml version=1.0 encoding=utf-8?
local:ModuleTitleWindow xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx
 xmlns:local=*
 width=400 height=300

s:TextArea width=100% height=100% /

/local:ModuleTitleWindow

package
{
 import spark.components.TitleWindow;

 [Frame(factoryClass=mx.core.FlexModuleFactory)]
 public class ModuleTitleWindow extends TitleWindow
 {
 public function ModuleTitleWindow()
 {
 super();
 }
 }
}

Any thoughts? Is there a workaround?

Thank you


Re: [flexcoders] Flex popup module ignores context menu

2012-02-20 Thread Alex Harui
Set mouseEnabled=true on the TitleWindow


On 2/20/12 3:29 AM, Adnan Doric astronaute@gmail.com wrote:






Hi all,

I followed the Alex's Popup Dialogs as Modules blog entry:
http://blogs.adobe.com/aharui/2007/08/popup_dialogs_as_modules.html

It works with mx.containers.TitleWindow as intended, the context menu
shows and I can copy/paste text in a TextArea.

But if I try to use spark.components.TitleWindow, the context menu does
not shows at all when right clicking in spark TextArea.

Application code:
?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx minWidth=955
minHeight=600

fx:Script
![CDATA[
 import mx.core.IVisualElement;
 import mx.events.ModuleEvent;
 import mx.modules.IModuleInfo;
 import mx.modules.ModuleManager;

private var info:IModuleInfo;

protected function loadModule(event:MouseEvent):void
 {
 info = ModuleManager.getModule(HelloModule.swf);
 info.addEventListener(ModuleEvent.READY, modEventHandler);
 info.load(null, null, null, moduleFactory);
 }

private function modEventHandler(event:ModuleEvent):void
 {
 addElement(info.factory.create() as IVisualElement);
 }

]]
/fx:Script

s:Button label=loadModule click=loadModule(event) /

/s:Application

module code:
?xml version=1.0 encoding=utf-8?
local:ModuleTitleWindow xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx
 xmlns:local=*
 width=400 height=300

s:TextArea width=100% height=100% /

/local:ModuleTitleWindow

package
{
 import spark.components.TitleWindow;

[Frame(factoryClass=mx.core.FlexModuleFactory)]
 public class ModuleTitleWindow extends TitleWindow
 {
 public function ModuleTitleWindow()
 {
 super();
 }
 }
}

Any thoughts? Is there a workaround?

Thank you





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Re: popup on screen certer?

2012-02-19 Thread markflex2007
I just test.PopUpManager can not work with s:SkinnablePopUpContainer.

other idea?

Thanks

Mark
--- In flexcoders@yahoogroups.com, Jeff Gomes jgomes@... wrote:

 PopUpManager.centerPopUp(pop);
 
 On 2/17/2012 14:36, markflex2007 wrote:
  Hi
 
I uses:SkinnablePopUpContainer  build a pop component for mobile app
 
and use the following code to call the popup
 
var pop:PopUpWindows =  new PopUpWindows();   
pop.open(this,true);
 
 
but the popup always in top-left location of current page. how to make 
  the popup on screen certer
 
please help
 
Thanks for help
 
Mark
  
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location: 
  https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
 
 
 
 





Re: [flexcoders] Re: popup on screen certer? [1 Attachment]

2012-02-19 Thread Jeff Gomes
Mark-

I don't know what you did to test this, but I was not guessing at my 
answer.  This is something I actually use (FB 4.6, btw, in case that 
matters).  As my gift to you, here is my simple Alert component that 
extends s:SkinnablePopUpContainer (attached as a ZIP and also pasted 
into the message, since I don't know which will work best on the list).

As you can see, it calls PopUpManager.centerPopUp(this) when it is first 
added to the stage and also anytime it receives a Resize event while it 
is open.  Some of the component is borrowed from tutorials I've seen on 
the web, but the code to handle resizing and centering was my own work.

-Jeff

?xml version=1.0 encoding=utf-8?
s:SkinnablePopUpContainer
 xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 addedToStage=_QueueCenter()
 creationComplete=_Init()
 
fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations
fx:Script
![CDATA[
 import mx.core.FlexGlobals;
 import mx.managers.PopUpManager;

 import spark.components.supportClasses.ViewNavigatorAction;

 [Bindable]
 public var alertTitle:String = alertTitle;

 [Bindable]
 public var alertMessage:String = alertMessage;

 private var _appTop:Object = 
mx.core.FlexGlobals.topLevelApplication;

 [Bindable]
 private var _nMaxWidth:Number = 300;

 private function _Center ( ) : void
 {
 if ( isOpen ) PopUpManager.centerPopUp ( this );
 }

 private function _Init ( ) : void
 {
 _appTop.addEventListener ( Event.RESIZE, _Resize );
 }

 private function _Resize ( e:* = null ) : void
 {
 if ( isOpen ) _QueueCenter ( );
 }

 private function _QueueCenter ( ) : void
 {
 _nMaxWidth = 0.9 * Math.min ( _appTop.width, 
_appTop.height );
 callLater ( _Center );
 }

 ]]
/fx:Script
s:TitleWindow
 id=titleWindow
 title={alertTitle}
 maxWidth={_nMaxWidth}
 close=close()
 
s:VGroup
 horizontalAlign=center
 horizontalCenter=0
 paddingLeft=16
 paddingTop=16
 paddingRight=16
 paddingBottom=16
 gap=24
 width=100%
 
s:Label
 id=message
 text={alertMessage}
 width=100%
 /
s:Button
 label=OK
 click=close(true)
 /
/s:VGroup
/s:TitleWindow
/s:SkinnablePopUpContainer

On 2/19/2012 08:15, markflex2007 wrote:
 I just test.PopUpManager can not work with s:SkinnablePopUpContainer.

 other idea?

 Thanks

 Mark
 --- In flexcoders@yahoogroups.com, Jeff Gomesjgomes@...  wrote:
 PopUpManager.centerPopUp(pop);

 On 2/17/2012 14:36, markflex2007 wrote:
 Hi

I uses:SkinnablePopUpContainer   build a pop component for mobile app

and use the following code to call the popup

var pop:PopUpWindows =  new PopUpWindows();  
pop.open(this,true);


but the popup always in top-left location of current page. how to make 
 the popup on screen certer

please help

Thanks for help

Mark
 



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links







 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






[flexcoders] popup on screen certer?

2012-02-17 Thread markflex2007
Hi
 
 I use s:SkinnablePopUpContainer build a pop component for mobile app
 
 and use the following code to call the popup
 
 var pop:PopUpWindows =  new PopUpWindows(); 
 pop.open(this,true);
 
 
 but the popup always in top-left location of current page. how to make the 
popup on screen certer 
 
 please help
 
 Thanks for help
 
 Mark




Re: [flexcoders] popup on screen certer?

2012-02-17 Thread Jeff Gomes
PopUpManager.centerPopUp(pop);

On 2/17/2012 14:36, markflex2007 wrote:
 Hi

   I uses:SkinnablePopUpContainer  build a pop component for mobile app

   and use the following code to call the popup

   var pop:PopUpWindows =  new PopUpWindows(); 
   pop.open(this,true);


   but the popup always in top-left location of current page. how to make the 
 popup on screen certer

   please help

   Thanks for help

   Mark
   



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






[flexcoders] privacy settings popup

2012-02-08 Thread Csomák Gábor
How to listen if a user already clicked accept, when the camera access
popup showed up?


Re: [flexcoders] privacy settings popup

2012-02-08 Thread claudiu ursica
You can't, FP does not provide a close event for that panel. There was a 
request in Jira but I am not sure what the status of this is  You need to 
listen for camera events and guess. There is activity and status events. In 
addition what I do I start a timer and monitor for a couple of seconds the 
camera.currentFps. if that is 0, something is wrong, if is constant there is 
also a chance that the camera delivered frames but stopped, otherwise camera is 
fine.


HTH,
Claudiu




 From: Csomák Gábor csom...@gmail.com
To: flexcoders flexcoders@yahoogroups.com 
Sent: Wednesday, February 8, 2012 12:46 PM
Subject: [flexcoders] privacy settings popup
 

  
How to listen if a user already clicked accept, when the camera access popup 
showed up?

 

Re: [flexcoders] privacy settings popup

2012-02-08 Thread Csomák Gábor
thanks

On Wed, Feb 8, 2012 at 2:52 PM, claudiu ursica the_bran...@yahoo.comwrote:


  You can't, FP does not provide a close event for that panel. There was a
 request in Jira but I am not sure what the status of this is  You need
 to listen for camera events and guess. There is activity and status events.
 In addition what I do I start a timer and monitor for a couple of seconds
 the camera.currentFps. if that is 0, something is wrong, if is constant
 there is also a chance that the camera delivered frames but stopped,
 otherwise camera is fine.

 HTH,
 Claudiu

   --
 *From:* Csomák Gábor csom...@gmail.com
 *To:* flexcoders flexcoders@yahoogroups.com
 *Sent:* Wednesday, February 8, 2012 12:46 PM
 *Subject:* [flexcoders] privacy settings popup


 How to listen if a user already clicked accept, when the camera access
 popup showed up?


   



[flexcoders] Re: How to tell if I am a popup.

2010-09-01 Thread aceoohay
Thanks for the info, I used;

this.isPopUp

and it worked great.

--- In flexcoders@yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote:

 http://livedocs.adobe.com/flex/3/langref/mx/core/IUIComponent.html#isPopUp
 
 Le 2010 8 30 22:44, aceoohay pa...@... a écrit :
 
 
 I have a mx:module component that I sometimes call with a moduleloader, and
 sometimes call with a popupManager. In order to close the item properly I
 need to know how I was instantiated (popup manager or module loader).
 
 Is there a property that I can check that will tell me this?
 
 Obviously I can set my own property, but I would prefer using one that
 already exists.
 
 Paul





Re: [flexcoders] How to tell if I am a popup.

2010-08-30 Thread Haykel BEN JEMIA
http://livedocs.adobe.com/flex/3/langref/mx/core/IUIComponent.html#isPopUp

Le 2010 8 30 22:44, aceoohay pa...@compuace.com a écrit :


I have a mx:module component that I sometimes call with a moduleloader, and
sometimes call with a popupManager. In order to close the item properly I
need to know how I was instantiated (popup manager or module loader).

Is there a property that I can check that will tell me this?

Obviously I can set my own property, but I would prefer using one that
already exists.

Paul

 


[flexcoders] Re: Scrolling a Popup in IE leads to UI distortion

2010-06-25 Thread LathaM
Thanks Alex.
That was the problem actually. The wmode was set to 'transparent'; Setting it 
to 'window' fixed the problem. 
Thanks for the help.

- Latha


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 If you have a non-default wmode all bets are off.
 
 
 On 6/24/10 8:54 AM, Latha prema...@... wrote:
 
 
 
 
 
 
 Hi Flex Experts,
 
 I am Latha, I am relatively new to the group.
 I need your help in fixing a problem in the application I am working on.
 
 We have a pop-up and it may or may not have vertical scroll bars.
 When there is a vertical scroll and we scroll fast, the UI gets distorted.
 Some parts of it becomes invisible; some control merges with the next control 
 and so on..
 
 Basically the Pop-up contains a form and I have not used any ItemRenderer in 
 it.
 This problem is seen only in IE, not in Firefox
 
 Any help/suggestion in this matter would be greatly appreciated.
 
 Thanks
 Latha
 
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Scrolling a Popup in IE leads to UI distortion

2010-06-24 Thread Latha
Hi Flex Experts,

I am Latha, I am relatively new to the group.
I need your help in fixing a problem in the application I am working on.

We have a pop-up and it may or may not have vertical scroll bars.
When there is a vertical scroll and we scroll fast, the UI gets distorted.
Some parts of it becomes invisible; some control merges with the next control 
and so on..

Basically the Pop-up contains a form and I have not used any ItemRenderer in it.
This problem is seen only in IE, not in Firefox

Any help/suggestion in this matter would be greatly appreciated.

Thanks
Latha



  

[flexcoders] Re: How to populate itemeditor with popup value

2010-06-08 Thread valdhor
You will need to create an event listener on the System Manager to trigger on 
the window close event (Will probably have to be at the application level). 
once the event triggers, grab the data that you need and inject it into the 
component that needs it. NB. System Manager handles all window events.

--- In flexcoders@yahoogroups.com, ilikeflex ilikef...@... wrote:

 Hi
 
 I am trying to create editable datagrid. I have also implemented itemEditEnd 
 event because i have nested datafield. I have custom itemeditor. In the 
 custom itemeditor, i have textInput and button to open the popup. I click to 
 open open pop up.I write some text in the pop up but that that text does not 
 appear in itemeditor after close popup.
 
 I have attached sample test code.I have added snippets but if you required i 
 can add complete test case.
 
 PopUp
 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns=customComponents.popups.*
   xmlns:mx=http://www.adobe.com/2006/mxml;
   xmlns:prgbar=com.vzw.framework.prgbar.*
   width=100%
   height=100%
   verticalScrollPolicy=off
   styleName=popupStyle
   mx:Script
   ![CDATA[
   import mx.managers.PopUpManager;
   public var opener:Object;
   public var testTextInputText:String;
   public function onTextChange(event:Event):void
   {
   testTextInputText=(event.currentTarget as 
 TextInput).text;
   }
   
   public function onOkClick():void
   {
   if(opener) opener.onPopUpClose();
   PopUpManager.removePopUp(this);
   }
   ]]
   /mx:Script
   mx:VBox width=100%
height=100%
paddingBottom=0
   mx:TextInput text=
 id=testTextInput
 change=onTextChange(event)/
   mx:Button label=ok click=onOkClick()/ 
   
   /mx:VBox
 /mx:TitleWindow
 
 
 ItemEditor
 ?xml version=1.0 encoding=utf-8?
 mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
width=100%
height=200
horizontalAlign=center
implements=customComponents.datagrid.IEditorValue
   
   mx:TextInput id=txtInputByUser/
   mx:Image source=assets/images/spyglass.gif
 buttonMode=true
 click=onUserClick(event)/
   mx:Script
   ![CDATA[
   import mx.events.CollectionEvent;
   import mx.collections.ArrayCollection;
   import mx.managers.PopUpManager;
   import customComponents.popups.CustomPopup;
   import mx.controls.listClasses.BaseListData;
 
   // Internal variable for the property value.
   private var _listData:BaseListData;
 
   // Make the listData property bindable.
   [Bindable(dataChange)]
 
   // Define the getter method.
   public function get listData():BaseListData
   {
   return _listData;
   }
 
   // Define the setter method,
   public function set listData(value:BaseListData):void
   {
   _listData=value;
   }
 
   public function get editValue():String
   {
   var returnString:String=;
   returnString=txtInputByUser.text;
   return returnString;
   }
 
   public var win:CustomPopup;
   
   
   public function onPopUpClose():void
   {
   txtInputByUser.text = win.testTextInputText;
   trace(Input At popup  +  
 win.testTextInputText);
   }
   
   protected function onUserClick(evt:Event):void
   {
   if(win==null)
   win=new CustomPopup();
   win.width=300;
   win.height=330;
   var point:Point=new Point(0, 0);
   point=evt.target.localToGlobal(point);
   win.y=point.x

[flexcoders] How to populate itemeditor with popup value

2010-06-06 Thread ilikeflex
Hi

I am trying to create editable datagrid. I have also implemented itemEditEnd 
event because i have nested datafield. I have custom itemeditor. In the custom 
itemeditor, i have textInput and button to open the popup. I click to open open 
pop up.I write some text in the pop up but that that text does not appear in 
itemeditor after close popup.

I have attached sample test code.I have added snippets but if you required i 
can add complete test case.

PopUp
?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns=customComponents.popups.*
xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:prgbar=com.vzw.framework.prgbar.*
width=100%
height=100%
verticalScrollPolicy=off
styleName=popupStyle
mx:Script
![CDATA[
import mx.managers.PopUpManager;
public var opener:Object;
public var testTextInputText:String;
public function onTextChange(event:Event):void
{
testTextInputText=(event.currentTarget as 
TextInput).text;
}

public function onOkClick():void
{
if(opener) opener.onPopUpClose();
PopUpManager.removePopUp(this);
}
]]
/mx:Script
mx:VBox width=100%
 height=100%
 paddingBottom=0
mx:TextInput text=
  id=testTextInput
  change=onTextChange(event)/
mx:Button label=ok click=onOkClick()/ 
  
/mx:VBox
/mx:TitleWindow


ItemEditor
?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
 width=100%
 height=200
 horizontalAlign=center
 implements=customComponents.datagrid.IEditorValue

mx:TextInput id=txtInputByUser/
mx:Image source=assets/images/spyglass.gif
  buttonMode=true
  click=onUserClick(event)/
mx:Script
![CDATA[
import mx.events.CollectionEvent;
import mx.collections.ArrayCollection;
import mx.managers.PopUpManager;
import customComponents.popups.CustomPopup;
import mx.controls.listClasses.BaseListData;

// Internal variable for the property value.
private var _listData:BaseListData;

// Make the listData property bindable.
[Bindable(dataChange)]

// Define the getter method.
public function get listData():BaseListData
{
return _listData;
}

// Define the setter method,
public function set listData(value:BaseListData):void
{
_listData=value;
}

public function get editValue():String
{
var returnString:String=;
returnString=txtInputByUser.text;
return returnString;
}

public var win:CustomPopup;


public function onPopUpClose():void
{
txtInputByUser.text = win.testTextInputText;
trace(Input At popup  +  
win.testTextInputText);
}

protected function onUserClick(evt:Event):void
{
if(win==null)
win=new CustomPopup();
win.width=300;
win.height=330;
var point:Point=new Point(0, 0);
point=evt.target.localToGlobal(point);
win.y=point.x;
win.x=point.y;
PopUpManager.addPopUp(win, this, true);
PopUpManager.centerPopUp(win);
}
]]
/mx:Script
/mx:HBox



Method

private function onitemEditEnd(event:DataGridEvent):void

[flexcoders] Re: How to know when a popup component is visible?

2010-05-19 Thread sk_acura
Could some one please post the create.php file.

I downloaded the latest version and it's not in the zip file.

thanks
mars



Re: [flexcoders] Use a Popup as itemEditor in Datagrids

2010-05-12 Thread DevSachin

Now problem has been solved. I use preventDefault in Item_Edit_Begin event
after closing the popup. but it prevent it on same condition as in
ITEM_EDIT_BEGINNING. it works fine now

Thanks
Sachin


Alex Harui wrote:
 
 You may not be able to prevent another edit session from ITEM_EDIT_END,
 but there should be an ITEM_EDIT_BEGINNING right after that you can use to 
 cancel the editing of that renderer.
 
 
 On 5/11/10 4:51 AM, DevSachin talktosachin2...@rediffmail.com wrote:
 
 
 
 
 
 
 
 Hi Alex,
 Thanks for Quick reply. Yes, it is not readonly but editedItemRenderer is
 readonly. Now, My 50% problem is solved but 50% is still remaining. After
 closing popup and returning focus to grid, cell is opened in edit mode. I
 want this cell in renderer mode. How should I dispatch itemEditEnd event
 from popup so after closing the popup, cell will not goes to edit mode?
 
 Thanks In advance
 Sachin dev tripathi
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui
 
 

-- 
View this message in context: 
http://old.nabble.com/Use-a-Popup-as-itemEditor-in-Datagrids-tp7071004p28535120.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] How to layer popup windows

2010-05-12 Thread Greg Hess
Thanks Alex, much appreciated!

-Greg

On Tue, May 11, 2010 at 4:21 PM, Alex Harui aha...@adobe.com wrote:



 The Application and all popups are parented by the SystemManager.  The
 SystemManager divides its children into four childlists (application, popup,
 tooltip, cursor).  The Application childlist is the lowest so that children
 in the popup childlist float over them, tooltips float over the application
 and popups and cursors float over everything.  The popup children probably
 should’ve been called “floating” or something like that.

 The PopUpManager always adds a popup over all the other children currently
 in the childlist specified in addPopUp/createPopUp, so depending on the
 order and childlist specified, you can get different things at different
 levels.

 I suspect you want the top level popup to go in the popup childlist



 On 5/11/10 12:52 PM, Greg Hess flexeff...@gmail.com wrote:






 Hi Alex,

 No, I was not specifying the childList and never understood the implication
 of using that argument.

 I updated my code however, same result.

 My top level popup, or the one I want on top specifies the parent as the
 main application and uses APPLICATION childList arg. My small middle layer
 popup specifies the module as the parent and specifies PARENT as the
 childList however, when the middle layer popup displayes on top of the top
 level popup.

 Should this be working or am I still missing something?

 Not sure if it makes a difference, but the actual code for displaying the
 popups is in the main application and it is being called from the module.

 Thanks,

 Greg

 On Tue, May 11, 2010 at 12:44 AM, Alex Harui aha...@adobe.com wrote:


 Are you using the childLIst parameter of PopUpManager?



 On 5/10/10 11:30 AM, Greg Hess flexeff...@gmail.com 
 http://flexeff...@gmail.com  wrote:






 Hi All,

 My application employs a modular architecture(main applications
 responsibility is just to load and unload modules). My module displays a
 popup window who's parent is the main application that covers the entire UI.
 Unfortunately, while this popup is displayed certain events occur in the
 module that it handles by displaying some small notification popups over UI
 components that are hidden by the big popup window, however the notification
 popups layer over the big popup.

 In reading the PopupManager docs I thought by simply assigning the module
 as the parent of my notification popups would resolve the issue by adding
 the popups to the module layer and not the top application layer, but it
 is not working and I am not sure if this is supported with the parent
 argument to addPopUp or I am doing something wrong.

 Does anyone know how I can show popups in different layers per say?

 Any help much appreciated.

 Greg





 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

 



Re: [flexcoders] Use a Popup as itemEditor in Datagrids

2010-05-11 Thread DevSachin

Hi Alex,
Thanks for Quick reply. Yes, it is not readonly but editedItemRenderer is
readonly. Now, My 50% problem is solved but 50% is still remaining. After
closing popup and returning focus to grid, cell is opened in edit mode. I
want this cell in renderer mode. How should I dispatch itemEditEnd event
from popup so after closing the popup, cell will not goes to edit mode?

Thanks In advance
Sachin dev tripathi
-- 
View this message in context: 
http://old.nabble.com/Use-a-Popup-as-itemEditor-in-Datagrids-tp7071004p28523124.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Use a Popup as itemEditor in Datagrids

2010-05-11 Thread Alex Harui
You may not be able to prevent another edit session from ITEM_EDIT_END, but 
there should be an ITEM_EDIT_BEGINNING right after that you can use to  cancel 
the editing of that renderer.


On 5/11/10 4:51 AM, DevSachin talktosachin2...@rediffmail.com wrote:







Hi Alex,
Thanks for Quick reply. Yes, it is not readonly but editedItemRenderer is
readonly. Now, My 50% problem is solved but 50% is still remaining. After
closing popup and returning focus to grid, cell is opened in edit mode. I
want this cell in renderer mode. How should I dispatch itemEditEnd event
from popup so after closing the popup, cell will not goes to edit mode?

Thanks In advance
Sachin dev tripathi

--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] How to layer popup windows

2010-05-11 Thread Greg Hess
Hi Alex,

No, I was not specifying the childList and never understood the implication
of using that argument.

I updated my code however, same result.

My top level popup, or the one I want on top specifies the parent as the
main application and uses APPLICATION childList arg. My small middle layer
popup specifies the module as the parent and specifies PARENT as the
childList however, when the middle layer popup displayes on top of the top
level popup.

Should this be working or am I still missing something?

Not sure if it makes a difference, but the actual code for displaying the
popups is in the main application and it is being called from the module.

Thanks,

Greg

On Tue, May 11, 2010 at 12:44 AM, Alex Harui aha...@adobe.com wrote:



 Are you using the childLIst parameter of PopUpManager?



 On 5/10/10 11:30 AM, Greg Hess flexeff...@gmail.com wrote:






 Hi All,

 My application employs a modular architecture(main applications
 responsibility is just to load and unload modules). My module displays a
 popup window who's parent is the main application that covers the entire UI.
 Unfortunately, while this popup is displayed certain events occur in the
 module that it handles by displaying some small notification popups over UI
 components that are hidden by the big popup window, however the notification
 popups layer over the big popup.

 In reading the PopupManager docs I thought by simply assigning the module
 as the parent of my notification popups would resolve the issue by adding
 the popups to the module layer and not the top application layer, but it
 is not working and I am not sure if this is supported with the parent
 argument to addPopUp or I am doing something wrong.

 Does anyone know how I can show popups in different layers per say?

 Any help much appreciated.

 Greg





 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

 



Re: [flexcoders] How to layer popup windows

2010-05-11 Thread Alex Harui
The Application and all popups are parented by the SystemManager.  The 
SystemManager divides its children into four childlists (application, popup, 
tooltip, cursor).  The Application childlist is the lowest so that children in 
the popup childlist float over them, tooltips float over the application and 
popups and cursors float over everything.  The popup children probably 
should’ve been called “floating” or something like that.

The PopUpManager always adds a popup over all the other children currently in 
the childlist specified in addPopUp/createPopUp, so depending on the order and 
childlist specified, you can get different things at different levels.

I suspect you want the top level popup to go in the popup childlist


On 5/11/10 12:52 PM, Greg Hess flexeff...@gmail.com wrote:






Hi Alex,

No, I was not specifying the childList and never understood the implication of 
using that argument.

I updated my code however, same result.

My top level popup, or the one I want on top specifies the parent as the main 
application and uses APPLICATION childList arg. My small middle layer popup 
specifies the module as the parent and specifies PARENT as the childList 
however, when the middle layer popup displayes on top of the top level popup.

Should this be working or am I still missing something?

Not sure if it makes a difference, but the actual code for displaying the 
popups is in the main application and it is being called from the module.

Thanks,

Greg

On Tue, May 11, 2010 at 12:44 AM, Alex Harui aha...@adobe.com wrote:

Are you using the childLIst parameter of PopUpManager?



On 5/10/10 11:30 AM, Greg Hess flexeff...@gmail.com 
http://flexeff...@gmail.com  wrote:






Hi All,

My application employs a modular architecture(main applications responsibility 
is just to load and unload modules). My module displays a popup window who's 
parent is the main application that covers the entire UI. Unfortunately, while 
this popup is displayed certain events occur in the module that it handles by 
displaying some small notification popups over UI components that are hidden by 
the big popup window, however the notification popups layer over the big popup.

In reading the PopupManager docs I thought by simply assigning the module as 
the parent of my notification popups would resolve the issue by adding the 
popups to the module layer and not the top application layer, but it is not 
working and I am not sure if this is supported with the parent argument to 
addPopUp or I am doing something wrong.

Does anyone know how I can show popups in different layers per say?

Any help much appreciated.

Greg





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


RE: Re: [flexcoders] Use a Popup as itemEditor in Datagrids

2010-05-10 Thread DevSachin

Hi Alex,
I studied your example at
http://blogs.adobe.com/aharui/2008/08/datagrid_with_popup_editor.html

I have created editing cell with popup editor with ADG  and also implement
cell edit in double click instead of single click.
I have written itemeditBeginning handler and written a condition where if
data is Date type then use prevent default to stop event processing and show
popup editor to edit the cell. If data is not Date type then
itemeditBeginning  goes with default behaviors(i.e. direct edit the cell).
I have a problem when i close popup form then focus is going to lastEdited
cell. some time it goes to first cell of the ADG(i.e. column[0]row[0]).
Since editedItemPosition is readonly so i can not set it.  How can i set
focus to the cell which is double clicked or what is the solution of the
problem.
 
Please let me know
 
Thanks
Sachin
-- 
View this message in context: 
http://old.nabble.com/Use-a-Popup-as-itemEditor-in-Datagrids-tp7071004p28509501.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Use a Popup as itemEditor in Datagrids

2010-05-10 Thread Alex Harui
EditedItemPosition should be read/write.


On 5/10/10 2:44 AM, DevSachin talktosachin2...@rediffmail.com wrote:







Hi Alex,
I studied your example at
http://blogs.adobe.com/aharui/2008/08/datagrid_with_popup_editor.html

I have created editing cell with popup editor with ADG  and also implement
cell edit in double click instead of single click.
I have written itemeditBeginning handler and written a condition where if
data is Date type then use prevent default to stop event processing and show
popup editor to edit the cell. If data is not Date type then
itemeditBeginning  goes with default behaviors(i.e. direct edit the cell).
I have a problem when i close popup form then focus is going to lastEdited
cell. some time it goes to first cell of the ADG(i.e. column[0]row[0]).
Since editedItemPosition is readonly so i can not set it.  How can i set
focus to the cell which is double clicked or what is the solution of the
problem.

Please let me know

Thanks
Sachin

--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] How to layer popup windows

2010-05-10 Thread Greg Hess
Hi All,

My application employs a modular architecture(main applications
responsibility is just to load and unload modules). My module displays a
popup window who's parent is the main application that covers the entire UI.
Unfortunately, while this popup is displayed certain events occur in the
module that it handles by displaying some small notification popups over UI
components that are hidden by the big popup window, however the notification
popups layer over the big popup.

In reading the PopupManager docs I thought by simply assigning the module as
the parent of my notification popups would resolve the issue by adding the
popups to the module layer and not the top application layer, but it is
not working and I am not sure if this is supported with the parent argument
to addPopUp or I am doing something wrong.

Does anyone know how I can show popups in different layers per say?

Any help much appreciated.

Greg


Re: [flexcoders] How to layer popup windows

2010-05-10 Thread Alex Harui
Are you using the childLIst parameter of PopUpManager?


On 5/10/10 11:30 AM, Greg Hess flexeff...@gmail.com wrote:






Hi All,

My application employs a modular architecture(main applications responsibility 
is just to load and unload modules). My module displays a popup window who's 
parent is the main application that covers the entire UI. Unfortunately, while 
this popup is displayed certain events occur in the module that it handles by 
displaying some small notification popups over UI components that are hidden by 
the big popup window, however the notification popups layer over the big popup.

In reading the PopupManager docs I thought by simply assigning the module as 
the parent of my notification popups would resolve the issue by adding the 
popups to the module layer and not the top application layer, but it is not 
working and I am not sure if this is supported with the parent argument to 
addPopUp or I am doing something wrong.

Does anyone know how I can show popups in different layers per say?

Any help much appreciated.

Greg





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Changing the modalTransparencyColor of an existing popup.

2010-04-28 Thread Alex Harui
The modal window is not looking for changes.  You should be able to find it in 
systemManager.popUpChildren and get its graphics and clear and draw a new fill.


On 4/27/10 4:45 PM, aceoohay pa...@compuace.com wrote:






I posted this question under another Subject.

I didn't realize precisely what the problem was and now I do, so I thought I 
would restate the question.

Is there anyway to change the transparency color of an existing modal popup?

I have tried the following, and it does not work.

var intRed:int = Math.round(Math.random() * (255));
var intBlue:int = Math.round(Math.random() * (255));
var intGreen:int = Math.round(Math.random() * (255));
this.setStyle(modalTransparencyColor,(intRed * 65536) + (intBlue*256) +
intGreen)
trace(xcolor= + ((intRed * 65536) + (intBlue*256) + intGreen).toString());

Any ideas?

Paul






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Changing the modalTransparencyColor of an existing popup.

2010-04-27 Thread aceoohay
I posted this question under another Subject.

I didn't realize precisely what the problem was and now I do, so I thought I 
would restate the question.

Is there anyway to change the transparency color of an existing modal popup?

I have tried the following, and it does not work.

var intRed:int = Math.round(Math.random() * (255));
var intBlue:int = Math.round(Math.random() * (255));
var intGreen:int = Math.round(Math.random() * (255));
this.setStyle(modalTransparencyColor,(intRed * 65536) + (intBlue*256) +
intGreen)
trace(xcolor= + ((intRed * 65536) + (intBlue*256) + intGreen).toString());

Any ideas?

Paul





[flexcoders] Variable-height popup

2010-04-12 Thread Richard Rodseth
In the context of:

mx:PopUpButton
  mx:popup
 mx:VBox
 
 /mx:VBox
  /mx:popup
/mx:PopUpButton

Is there a simple way to give the popup a height of, say, 50% of the
current application height, along with a min and max height?


Re: [flexcoders] Variable-height popup

2010-04-12 Thread Alex Harui
Set the height in code in a creationComplete and show handler


On 4/12/10 10:14 AM, Richard Rodseth rrods...@gmail.com wrote:






In the context of:

mx:PopUpButton
 mx:popup
 mx:VBox
 
 /mx:VBox
 /mx:popup
/mx:PopUpButton

Is there a simple way to give the popup a height of, say, 50% of the
current application height, along with a min and max height?





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Positioning / Scrolling problem with Flex popup

2010-04-09 Thread s_grollins
Hi all,

I'm trying to work out a specific problem I'm having with positioning in Flex 
using the PopUpManager. Basically I'm wanting to create a popup which will 
scroll with the parent container - this is necessary because the parent 
container is large and if the user's browser window isn't large enough (this 
will be the case the majority of the time) - they will have to use the 
scrollbar of the container to scroll down. The problem is that the popup is 
positioned relative to another component, and it needs to stay by that 
component. (also sorry if the code below isn't formatted right, but I pasted it 
right from Eclipse).

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute

  mx:Script
![CDATA[
  import mx.core.UITextField;
  import mx.containers.TitleWindow;
  import mx.managers.PopUpManager;

  private function clickeroo(event:MouseEvent):void {
var popup:TitleWindow = new TitleWindow();
popup.width = 250;
popup.height = 300;

popup.title = Example;
var tf:UITextField = new UITextField();
tf.wordWrap = true;
tf.width = popup.width - 30;
tf.text = This window stays put and doesn't scroll when the hbox is 
scrolled (even with using the hbox as parent in the addPopUp method), I need 
the popup to be local to the HBox.;
popup.addChild(tf);

PopUpManager.addPopUp(popup, hbox, false);
  }
]]
  /mx:Script

  mx:HBox width=100% height=2000 id=hbox
mx:Button label=Click Me click=clickeroo(event)/
  /mx:HBox

/mx:Application




[flexcoders] Re: Positioning / Scrolling problem with Flex popup

2010-04-09 Thread turbo_vb
You'll want to create a method that does something like this:

var target:Point = localToGlobal( new Point( hbox.x, hbox.y ) );
popup.move( target.x, target.y );

Call the method after you add the popup and when the container is scrolled.  In 
some cases localToContent is more appropriate.

-TH

--- In flexcoders@yahoogroups.com, s_grollins s.groll...@... wrote:

 Hi all,
 
 I'm trying to work out a specific problem I'm having with positioning in Flex 
 using the PopUpManager. Basically I'm wanting to create a popup which will 
 scroll with the parent container - this is necessary because the parent 
 container is large and if the user's browser window isn't large enough (this 
 will be the case the majority of the time) - they will have to use the 
 scrollbar of the container to scroll down. The problem is that the popup is 
 positioned relative to another component, and it needs to stay by that 
 component. (also sorry if the code below isn't formatted right, but I pasted 
 it right from Eclipse).
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 
   mx:Script
 ![CDATA[
   import mx.core.UITextField;
   import mx.containers.TitleWindow;
   import mx.managers.PopUpManager;
 
   private function clickeroo(event:MouseEvent):void {
 var popup:TitleWindow = new TitleWindow();
 popup.width = 250;
 popup.height = 300;
 
 popup.title = Example;
 var tf:UITextField = new UITextField();
 tf.wordWrap = true;
 tf.width = popup.width - 30;
 tf.text = This window stays put and doesn't scroll when the hbox is 
 scrolled (even with using the hbox as parent in the addPopUp method), I need 
 the popup to be local to the HBox.;
 popup.addChild(tf);
 
 PopUpManager.addPopUp(popup, hbox, false);
   }
 ]]
   /mx:Script
 
   mx:HBox width=100% height=2000 id=hbox
 mx:Button label=Click Me click=clickeroo(event)/
   /mx:HBox
 
 /mx:Application





Re: [flexcoders] Re: Positioning / Scrolling problem with Flex popup

2010-04-09 Thread joao zaratine
try it:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
height=100% width=100%

mx:Script
![CDATA[
import mx.core.UITextField;
import mx.containers.TitleWindow;
import mx.managers.PopUpManager;

private function clickeroo(event:MouseEvent):

void {
var popup:TitleWindow = new TitleWindow();
popup.width = 250;
popup.height = 300;

popup.title = Example;
var tf:UITextField = new UITextField();
tf.wordWrap = true;
tf.width = popup.width - 30;
tf.text = This window stays put and doesn't scroll when the hbox is
scrolled (even with using the hbox as parent in the addPopUp method), I need
the popup to be local to the HBox.;
popup.addChild(tf);

PopUpManager.addPopUp(popup, DisplayObject(Application.application), false);
//I think this instead of DisplayObject(Application.application) will work
too.
}
]]
/mx:Script

mx:HBox width=100% height=2000 id=hbox
mx:Button label=Click Me click=clickeroo(event)/
/mx:HBox

/mx:Application

João Augusto Zaratine
blog.joaoaugusto.com.br (in portuguese)

2010/4/9 turbo_vb timh...@aol.com



 You'll want to create a method that does something like this:

 var target:Point = localToGlobal( new Point( hbox.x, hbox.y ) );
 popup.move( target.x, target.y );

 Call the method after you add the popup and when the container is scrolled.
 In some cases localToContent is more appropriate.

 -TH


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 s_grollins s.groll...@... wrote:
 
  Hi all,
 
  I'm trying to work out a specific problem I'm having with positioning in
 Flex using the PopUpManager. Basically I'm wanting to create a popup which
 will scroll with the parent container - this is necessary because the parent
 container is large and if the user's browser window isn't large enough (this
 will be the case the majority of the time) - they will have to use the
 scrollbar of the container to scroll down. The problem is that the popup is
 positioned relative to another component, and it needs to stay by that
 component. (also sorry if the code below isn't formatted right, but I pasted
 it right from Eclipse).
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 
  mx:Script
  ![CDATA[
  import mx.core.UITextField;
  import mx.containers.TitleWindow;
  import mx.managers.PopUpManager;
 
  private function clickeroo(event:MouseEvent):void {
  var popup:TitleWindow = new TitleWindow();
  popup.width = 250;
  popup.height = 300;
 
  popup.title = Example;
  var tf:UITextField = new UITextField();
  tf.wordWrap = true;
  tf.width = popup.width - 30;
  tf.text = This window stays put and doesn't scroll when the hbox is
 scrolled (even with using the hbox as parent in the addPopUp method), I need
 the popup to be local to the HBox.;
  popup.addChild(tf);
 
  PopUpManager.addPopUp(popup, hbox, false);
  }
  ]]
  /mx:Script
 
  mx:HBox width=100% height=2000 id=hbox
  mx:Button label=Click Me click=clickeroo(event)/
  /mx:HBox
 
  /mx:Application
 

  




-- 
João Augusto Zaratine
blog.joaoaugusto.com.br


[flexcoders] Popup focus issue, seems very broken

2010-03-09 Thread Nigel Magnay
I have a very odd issue in my Flex3 app.

I have a popup that is an mx:TitleWindow, instantiated with the
popupManager in the normal way. It has a number of buttons, and a
canvas. On creationComplete, an additional control is dynamically
added to the canvas using childCanvas.addChild().

Everything works perfectly, *except* that the focus does not arrive in
the popup; it remains in the background application window (which is
blurred out as normal). On tabbing, I can observe the blue focus
rectangle moving about the old top-level window.

This doesn't always happen- but in about 75% of cases it does. If I
manually set the focus into the popup (e.g into a textfield or a
button), then tabbing continues to only have an effect in the wrong
window.

I've tried explicitly setting the focus in the creationComplete method
(setFocus), both in the popup and from the outer container but no
dice. I've tried making the added component trivially simple, and it
still seems to cause it to break.

Any good ideas, or is this just terminally broken?


Re: [flexcoders] Popup focus issue, seems very broken

2010-03-09 Thread Alex Harui
Try using an Alert instead of the TitleWindow.  If that works, then there is 
probably code in the titleWindow causing problems, otherwise it is probably 
code in the app.  You can try tracing out focusIn/focusOut events to see what 
is going on.


On 3/9/10 4:15 AM, Nigel Magnay nigel.mag...@gmail.com wrote:






I have a very odd issue in my Flex3 app.

I have a popup that is an mx:TitleWindow, instantiated with the
popupManager in the normal way. It has a number of buttons, and a
canvas. On creationComplete, an additional control is dynamically
added to the canvas using childCanvas.addChild().

Everything works perfectly, *except* that the focus does not arrive in
the popup; it remains in the background application window (which is
blurred out as normal). On tabbing, I can observe the blue focus
rectangle moving about the old top-level window.

This doesn't always happen- but in about 75% of cases it does. If I
manually set the focus into the popup (e.g into a textfield or a
button), then tabbing continues to only have an effect in the wrong
window.

I've tried explicitly setting the focus in the creationComplete method
(setFocus), both in the popup and from the outer container but no
dice. I've tried making the added component trivially simple, and it
still seems to cause it to break.

Any good ideas, or is this just terminally broken?





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] RTE focusManager is null in a popup

2010-02-04 Thread reflexactions
I have a custom control that is similar to a combo in that it has a 'popup' 
dropdown.

The difference is that the popup is editable and can be clicked into.

The problem I am having is that when I click into the dropdown I get a RTE 
because focusManager is null.

The problem seems to be that the addPopUp sets the parent to be the SM and and 
the owner is my control.

With SM as parent the focusManager is automatically null.

So where am I going wrong?



Re: [flexcoders] RTE focusManager is null in a popup

2010-02-04 Thread Alex Harui
I think the popup has to implement IFocusManagerContainer.  See the 
dropDownSwatch in ColorPicker.


On 2/4/10 7:10 PM, reflexactions reflexacti...@yahoo.com wrote:






I have a custom control that is similar to a combo in that it has a 'popup' 
dropdown.

The difference is that the popup is editable and can be clicked into.

The problem I am having is that when I click into the dropdown I get a RTE 
because focusManager is null.

The problem seems to be that the addPopUp sets the parent to be the SM and and 
the owner is my control.

With SM as parent the focusManager is automatically null.

So where am I going wrong?






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [SPAM] [flexcoders] popup dialog with grow ability?

2010-02-01 Thread MicC



If you have a link that would be great  googled for about an hour before 
posting request - found some interesting popup stuff but nothing that had 
expand.


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 I don't have one handy but google will.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of MicC
 Sent: Saturday, January 30, 2010 7:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [SPAM] [flexcoders] popup dialog with grow ability?
 
  
 
   
 
 Looking for a popup example where the popup can be grabbed and expanded.
 TIA,
 
 Mic.





Re: [SPAM] [flexcoders] popup dialog with grow ability?

2010-02-01 Thread Everson Alves
This could be done with separate questions: 1) how to make a popup for a
custom component ( e.g. a custom panel, canvas etc). 2) How to make a custom
component expandable. There's lots of material about that too.

2010/2/1 MicC chigwel...@yahoo.com




 If you have a link that would be great  googled for about an hour
 before posting request - found some interesting popup stuff but nothing that
 had expand.


 --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:
 
  I don't have one handy but google will.
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
_
 
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of MicC
  Sent: Saturday, January 30, 2010 7:10 PM
  To: flexcoders@yahoogroups.com
  Subject: [SPAM] [flexcoders] popup dialog with grow ability?
 
 
 
 
 
  Looking for a popup example where the popup can be grabbed and expanded.
  TIA,
 
  Mic.
 




 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






-- 
Jhonny Everson


RE: [SPAM] [flexcoders] popup dialog with grow ability?

2010-01-31 Thread Tracy Spratt
I don't have one handy but google will.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of MicC
Sent: Saturday, January 30, 2010 7:10 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] popup dialog with grow ability?

 

  

Looking for a popup example where the popup can be grabbed and expanded.
TIA,

Mic.





RE: [SPAM] [flexcoders] popup dialog with grow ability?

2010-01-31 Thread Tracy Spratt
I don't have one handy but google will.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of MicC
Sent: Saturday, January 30, 2010 7:10 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] popup dialog with grow ability?

 

  

Looking for a popup example where the popup can be grabbed and expanded.
TIA,

Mic.





[flexcoders] popup dialog with grow ability?

2010-01-30 Thread MicC
Looking for a popup example where the popup can be grabbed and expanded. TIA,

Mic.



[flexcoders] How to mouse-wheel scroll DataGrid in TitleWindow popup?

2010-01-11 Thread gmbroth
Hi,

I'm stumped on a problem and could use some help: I have a 
PopUpManager-launched TitleWindow (modal == true) that contains a DataGrid. 
Using the DataGrid's slider, I can move through the data rows just fine but 
can't scroll the DG using the mouse wheel. As a test, I set a 
MouseEvent.MOUSE_WHEEL listener on the TitleWindow and, sure enough, it doesn't 
get any mouse wheel events. Rolling the mouse wheel doesn't make anything 
happen in any other context either, at least not that I can see.

As the application is written, the popup's parent is an HBox but I've tried 
other parent components with no change in behavior. Is this a focus issue? How 
can I get the popup's DG to recognize and scroll on mouse wheel events?

Flex SDK 3.4, Flash Player 10.x, Firefox 3.0, Windows XP

Thanks, Garry



Re: [Spam] RE: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand

2009-12-29 Thread Nick Middleweek
Hello, thanks for your reply...

The event is being dispatched from a Command but I'm using HTTP Service and
AsyncToken to call a Web Service. I think my problem would be getting the
function ref from the delegate to the responder Command as they are
de-linked if that makes sense...


Cheers,
Nick




2009/12/25 Vaibhav Seth vaibhav.s...@live.com



 Hi,

 Thanks for the appreciation.
 Yups you have got it right. But in you statement:


 then I have the problem of getting that function reference over into the
 2nd CairngormEvent, which isn't created and fired until the Web Service
 responder is called

 I think you are talking about dispatching an event from the command or
 Sequence Command type of thing.

 For that scenario, you can pass on that function reference to the the 2nd
 Cairngorm Event also.
 You can keep that parameter in the Event also. So that you always does not
 need to worry about it.
 And Function reference is in terms of instance of the command. If your
 command gets fired again before it returns you the result for the last
 executed method, even then you are safe.

 Keeping the view reference in the model have pros and cons. I will not
 prefer that way, simply because it breaks the encapsulation, view gets
 publicly exposed as the Model is a singleton class.

 But there is no hard and fast rule as well.. :)

 Thanks,
 Vaibhav Seth.




 [image: i'm] EMAILING FOR THE GREATER GOOD
 Join mehttp://im.live.com/Messenger/IM/Home/?source=EML_WLHM_GreaterGood

 --
 To: flexcoders@yahoogroups.com
 From: n...@middleweek.co.uk
 Date: Tue, 22 Dec 2009 16:03:43 +
 Subject: Re: [Spam] RE: [flexcoders] Using Cairngorm and how to display a
 Popup from aCommand



  Nice post and thanks for replying...

 I understand your first solution, I think it's similar to a ChangeWatcher
 approach... but I'm a bit lost with the 2nd approach...


 In my circumstance, I have a button in my view that fires a Flash CLICK
 event, the view-mediator Handles it and fires a CairngormEvent, which
 invokes a CairngormCommand to call a Web Service to fetch some data. The
 data is loaded asynchronously and passed into a new CairngormEvent which
 then fires a CairngormCommand, this Command unpacks the data and if it's all
 gravy, it will update the model and the fetched data is displayed on the
 current View. If the data contains Fault event info then I need to show a
 custom PopUp component...

 I think, you're 2nd solution is storing a private or public function from
 inside the View on the CairngormEvent that is fired to reference it later...
 If I've got that right, then I have the problem of getting that function
 reference over into the 2nd CairngormEvent, which isn't created and fired
 until the Web Service responder is called... Which I believe is completely
 detached from the original CairngormEvent/ Command.

 I guess I could put the function ref on the model as a central repository
 but I could also just stick a reference to the View on the model and use
 that reference in the CairngormCommand and call PopUpManager.createPopup...


 What are your thoughts cause I'm a bit lost :)


 Cheers,
 nick





 2009/12/21 Vaibhav Seth vaibhav.s...@live.com


  hi,


 Well that's a good question for the starters. Please go through my below
 blog. Hope you will get some thing out from there.

 http://groups.adobe.com/posts/ffa987b8a4




 Thanks,
 Vaibhav Seth.


   



RE: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand

2009-12-24 Thread Vaibhav Seth

Hi,

Thanks for the appreciation.
Yups you have got it right. But in you statement:

then I have the problem of getting that function reference over into the
2nd CairngormEvent, which isn't created and fired until the Web Service
responder is called

I think you are talking about dispatching an event from the command or Sequence 
Command type of thing.

For that scenario, you can pass on that function reference to the the 2nd 
Cairngorm Event also.
You can keep that parameter in the Event also. So that you always does not need 
to worry about it.
And Function reference is in terms of instance of the command. If your command 
gets fired again before it returns you the result for the last executed method, 
even then you are safe.

Keeping the view reference in the model have pros and cons. I will not prefer 
that way, simply because it breaks the encapsulation, view gets publicly 
exposed as the Model is a singleton class.

But there is no hard and fast rule as well.. :) 

Thanks,
Vaibhav Seth.




 EMAILING FOR THE GREATER GOOD
Join me

To: flexcoders@yahoogroups.com
From: n...@middleweek.co.uk
Date: Tue, 22 Dec 2009 16:03:43 +
Subject: Re: [Spam] RE: [flexcoders] Using Cairngorm and how to display a   
Popup from aCommand


















 



  



  
  
  Nice post and thanks for replying...

I understand your first solution, I think it's similar to a ChangeWatcher 
approach... but I'm a bit lost with the 2nd approach...


In my circumstance, I have a button in my view that fires a Flash CLICK event, 
the view-mediator Handles it and fires a CairngormEvent, which invokes a 
CairngormCommand to call a Web Service to fetch some data. The data is loaded 
asynchronously and passed into a new CairngormEvent which then fires a 
CairngormCommand, this Command unpacks the data and if it's all gravy, it will 
update the model and the fetched data is displayed on the current View. If the 
data contains Fault event info then I need to show a custom PopUp component...



I think, you're 2nd solution is storing a private or public function from 
inside the View on the CairngormEvent that is fired to reference it later... If 
I've got that right, then I have the problem of getting that function reference 
over into the 2nd CairngormEvent, which isn't created and fired until the Web 
Service responder is called... Which I believe is completely detached from the 
original CairngormEvent/ Command.



I guess I could put the function ref on the model as a central repository but I 
could also just stick a reference to the View on the model and use that 
reference in the CairngormCommand and call PopUpManager.createPopup...




What are your thoughts cause I'm a bit lost :)


Cheers,
nick





2009/12/21 Vaibhav Seth vaibhav.s...@live.com

















 



  



  
  
  


hi,


Well that's a good question for the starters. Please go through my below blog. 
Hope you will get some thing out from there.

http://groups.adobe.com/posts/ffa987b8a4






Thanks,
Vaibhav Seth.






 









  

RE: [SPAM] Re: [Spam] Re: [flexcoders] How to dispatchevent in popup window?

2009-12-23 Thread Tracy Spratt
Tight coupling is not bad, it just has consequences.  You will need to
judge for yourself the cost/benefit in your case.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Nick Middleweek
Sent: Monday, December 21, 2009 1:46 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] Re: [Spam] Re: [flexcoders] How to dispatchevent in popup
window?

 

  

Hi,

I'm quite new to Flex and was wondering if it's possible to use Meta Tags to
declare the custom Event that is to be fired from the 'popup' component.


And then assign that Custom Event to the function handler in the parent MXML
or AS file?


I guess this is the same as Geoff and Vaibhav's suggestion? Why do you guys
suggest that the parent dispatches the event. Doesn't that cause compoenent
coupling which I understand to be a bad thing?...


Thanks - as I say, I'm new to this stuff so am curious to the thoughts of
those in the know...


Cheers,
Nick






2009/12/18 Fotis Chatzinikos fotis.chatzinikos@
mailto:fotis.chatzini...@gmail.com gmail.com

  

Either what Valdor suggested, or in your pop window have a componentOwner
refrence which you use to dispatch your event:


popup:
public var componentOwner:DisplayObject ;


popup dispatches event:

componentOwner.dispatchEvent(...your event...) ;


application using the popup:

thePopUp = new MyCustomPopUp() ;
thePopUp.componentOwner = this ; 
PopUpManager.addPopUp(thePopUp) ;




On Thu, Dec 17, 2009 at 10:05 PM, markflex2007 markflex2007@
mailto:markflex2...@yahoo.com yahoo.com wrote:

  

Hi,

I want to dispatch event in popup window and capture the event 
in base page.

Please give me a idea how to do this.

Thanks

Mark





-- 
Fotis Chatzinikos, Ph.D.
Founder,
LivinData Technologies
www.styledropper. http://www.styledropper.com com
Fotis.Chatzinikos@ mailto:fotis.chatzini...@gmail.com gmail.com, 

 





[flexcoders] How to disable 'actionscript error popup window?

2009-12-23 Thread markflex2007
Hi,

Do you think if it is possible to do this?

Thanks

Marks





RE: [flexcoders] How to disable 'actionscript error popup window?

2009-12-23 Thread Alex Harui
Well, if you can keep your code from causing errors to be thrown, you won't see 
that dialog.

In general, though, the vast majority of people run the release player which 
never shows the dialog.

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 markflex2007
Sent: Wednesday, December 23, 2009 1:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to disable 'actionscript error popup window?



Hi,

Do you think if it is possible to do this?

Thanks

Marks



RE: [flexcoders] Using Cairngorm and how to display a Popup from a Command

2009-12-22 Thread Vaibhav Seth

hi,


Well that's a good question for the starters. Please go through my below blog. 
Hope you will get some thing out from there.

http://groups.adobe.com/posts/ffa987b8a4



Thanks,
Vaibhav Seth.




 EMAILING FOR THE GREATER GOOD
Join me

To: flexcoders@yahoogroups.com
From: n...@middleweek.co.uk
Date: Mon, 21 Dec 2009 19:05:46 +
Subject: [flexcoders] Using Cairngorm and how to display a Popup from a Command


















 



  



  
  
  Hi,

If there's a preferred place to ask this, please let me know but I'm working on 
my first Cairngorm project and am getting used to how it all works which is 
great. I have a command that is fired after an event is notified that data is 
received from a Web Service. If there is a Fault or Error I want to show a 
custom Popup Component.



My question is how do others deal with this? If I use PopupManager.add or 
create PopUp I need to pass in the parent : DisplayObject... What is best 
practice to reference the parent ?

Would you create a reference on the model.rootApplication = this; and set that 
on the initialise event and pass that reference in or perhaps you would use 
ChangeWatcher to listen for changes on a model error property which woudl fire 
the Action Script on the mediator to create the PopUp...




What is the best/ nicest/ standard approach to handling this?


Thanks for your help...


Nick






 









  

Re: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand

2009-12-22 Thread Nick Middleweek
Nice post and thanks for replying...

I understand your first solution, I think it's similar to a ChangeWatcher
approach... but I'm a bit lost with the 2nd approach...


In my circumstance, I have a button in my view that fires a Flash CLICK
event, the view-mediator Handles it and fires a CairngormEvent, which
invokes a CairngormCommand to call a Web Service to fetch some data. The
data is loaded asynchronously and passed into a new CairngormEvent which
then fires a CairngormCommand, this Command unpacks the data and if it's all
gravy, it will update the model and the fetched data is displayed on the
current View. If the data contains Fault event info then I need to show a
custom PopUp component...

I think, you're 2nd solution is storing a private or public function from
inside the View on the CairngormEvent that is fired to reference it later...
If I've got that right, then I have the problem of getting that function
reference over into the 2nd CairngormEvent, which isn't created and fired
until the Web Service responder is called... Which I believe is completely
detached from the original CairngormEvent/ Command.

I guess I could put the function ref on the model as a central repository
but I could also just stick a reference to the View on the model and use
that reference in the CairngormCommand and call PopUpManager.createPopup...


What are your thoughts cause I'm a bit lost :)


Cheers,
nick




2009/12/21 Vaibhav Seth vaibhav.s...@live.com



 hi,


 Well that's a good question for the starters. Please go through my below
 blog. Hope you will get some thing out from there.

 http://groups.adobe.com/posts/ffa987b8a4




 Thanks,
 Vaibhav Seth.




Re: [Spam] Re: [flexcoders] How to dispatchevent in popup window?

2009-12-21 Thread Nick Middleweek
Hi,

I'm quite new to Flex and was wondering if it's possible to use Meta Tags to
declare the custom Event that is to be fired from the 'popup' component.


And then assign that Custom Event to the function handler in the parent MXML
or AS file?


I guess this is the same as Geoff and Vaibhav's suggestion? Why do you guys
suggest that the parent dispatches the event. Doesn't that cause compoenent
coupling which I understand to be a bad thing?...


Thanks - as I say, I'm new to this stuff so am curious to the thoughts of
those in the know...


Cheers,
Nick





2009/12/18 Fotis Chatzinikos fotis.chatzini...@gmail.com



 Either what Valdor suggested, or in your pop window have a componentOwner
 refrence which you use to dispatch your event:


 popup:
 public var componentOwner:DisplayObject ;


 popup dispatches event:

 componentOwner.dispatchEvent(...your event...) ;


 application using the popup:

 thePopUp = new MyCustomPopUp() ;
 thePopUp.componentOwner = this ;
 PopUpManager.addPopUp(thePopUp) ;



 On Thu, Dec 17, 2009 at 10:05 PM, markflex2007 markflex2...@yahoo.comwrote:



 Hi,

 I want to dispatch event in popup window and capture the event
 in base page.

 Please give me a idea how to do this.

 Thanks

 Mark




 --
 Fotis Chatzinikos, Ph.D.
 Founder,
 LivinData Technologies
 www.styledropper.com
 fotis.chatzini...@gmail.com,
  



[flexcoders] Using Cairngorm and how to display a Popup from a Command

2009-12-21 Thread Nick Middleweek
Hi,

If there's a preferred place to ask this, please let me know but I'm working
on my first Cairngorm project and am getting used to how it all works which
is great. I have a command that is fired after an event is notified that
data is received from a Web Service. If there is a Fault or Error I want to
show a custom Popup Component.

My question is how do others deal with this? If I use PopupManager.add or
create PopUp I need to pass in the parent : DisplayObject... What is best
practice to reference the parent ?

Would you create a reference on the model.rootApplication = this; and set
that on the initialise event and pass that reference in or perhaps you would
use ChangeWatcher to listen for changes on a model error property which
woudl fire the Action Script on the mediator to create the PopUp...


What is the best/ nicest/ standard approach to handling this?


Thanks for your help...


Nick


[Spam] Re: [flexcoders] How to dispatchevent in popup window?

2009-12-21 Thread Tibor
Hi Nick,

Yes, you can use Meta-data tags to declare an event in your component:
[Event(name=eventname, type=path.to.event.class)]

This will enable code completion for your custom event.

You can then add listeners to your event just as you would to other component 
events.


And no, the parent shouldn't dispatch the event, this does cause component 
coupling.

I'm pretty certain though that the people who suggested that did it for the 
sake of simplicity.
In case of a quick-and-dirty prototype, you might not want to extend 
TitleWindow to create a popup, you can simply create an instance of TitleWindow 
and add your content to it, in such a case, you don't have the ability to 
dispatch a custom event from within your popup.

Hope this helps,

Tibor.

www.tiborballai.com


--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Hi,
 
 I'm quite new to Flex and was wondering if it's possible to use Meta Tags to
 declare the custom Event that is to be fired from the 'popup' component.
 
 
 And then assign that Custom Event to the function handler in the parent MXML
 or AS file?
 
 
 I guess this is the same as Geoff and Vaibhav's suggestion? Why do you guys
 suggest that the parent dispatches the event. Doesn't that cause compoenent
 coupling which I understand to be a bad thing?...
 
 
 Thanks - as I say, I'm new to this stuff so am curious to the thoughts of
 those in the know...
 
 
 Cheers,
 Nick
 
 
 
 
 
 2009/12/18 Fotis Chatzinikos fotis.chatzini...@...
 
 
 
  Either what Valdor suggested, or in your pop window have a componentOwner
  refrence which you use to dispatch your event:
 
 
  popup:
  public var componentOwner:DisplayObject ;
 
 
  popup dispatches event:
 
  componentOwner.dispatchEvent(...your event...) ;
 
 
  application using the popup:
 
  thePopUp = new MyCustomPopUp() ;
  thePopUp.componentOwner = this ;
  PopUpManager.addPopUp(thePopUp) ;
 
 
 
  On Thu, Dec 17, 2009 at 10:05 PM, markflex2007 markflex2...@...wrote:
 
 
 
  Hi,
 
  I want to dispatch event in popup window and capture the event
  in base page.
 
  Please give me a idea how to do this.
 
  Thanks
 
  Mark
 
 
 
 
  --
  Fotis Chatzinikos, Ph.D.
  Founder,
  LivinData Technologies
  www.styledropper.com
  fotis.chatzini...@...,
   
 





Re: [flexcoders] How to dispatchevent in popup window?

2009-12-18 Thread Fotis Chatzinikos
Either what Valdor suggested, or in your pop window have a componentOwner
refrence which you use to dispatch your event:


popup:
public var componentOwner:DisplayObject ;


popup dispatches event:

componentOwner.dispatchEvent(...your event...) ;


application using the popup:

thePopUp = new MyCustomPopUp() ;
thePopUp.componentOwner = this ;
PopUpManager.addPopUp(thePopUp) ;


On Thu, Dec 17, 2009 at 10:05 PM, markflex2007 markflex2...@yahoo.comwrote:



 Hi,

 I want to dispatch event in popup window and capture the event
 in base page.

 Please give me a idea how to do this.

 Thanks

 Mark

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
LivinData Technologies
www.styledropper.com
fotis.chatzini...@gmail.com,


[flexcoders] How to dispatchevent in popup window?

2009-12-17 Thread markflex2007
Hi,

I want to dispatch event in popup window and capture the event 
in base page.

Please give me a idea how to do this.

Thanks

Mark



Re: [flexcoders] How to dispatchevent in popup window?

2009-12-17 Thread Geoff White

var myPopup:Panel = new Panel();

myPopup.addEventListener(someEventType, handler);
PopUpManager.addPopUp(myPopup, this).




From: markflex2007 markflex2...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Thu, December 17, 2009 1:05:52 PM
Subject: [flexcoders] How to dispatchevent in popup window?

  
Hi,

I want to dispatch event in popup window and capture the event 
in base page.

Please give me a idea how to do this.

Thanks

Mark


 

[flexcoders] Re: How to dispatchevent in popup window?

2009-12-17 Thread valdhor
You need to add the event listener to the SystemManager.

SystemManager handles all events from popup windows.

--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 Hi,
 
 I want to dispatch event in popup window and capture the event 
 in base page.
 
 Please give me a idea how to do this.
 
 Thanks
 
 Mark





RE: [flexcoders] Re: How to dispatchevent in popup window?

2009-12-17 Thread Vaibhav Seth

var obj:PopUpComp = PopUpManager.createPopUp(this,PopUpComp);
obj.addEventListener()

Thanks,
Vaibhav Seth.




 EMAILING FOR THE GREATER GOOD
Join me

To: flexcoders@yahoogroups.com
From: valdhorli...@embarqmail.com
Date: Thu, 17 Dec 2009 21:21:42 +
Subject: [flexcoders] Re: How to dispatchevent in popup window?


















 



  



  
  
  You need to add the event listener to the SystemManager.



SystemManager handles all events from popup windows.



--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:



 Hi,

 

 I want to dispatch event in popup window and capture the event 

 in base page.

 

 Please give me a idea how to do this.

 

 Thanks

 

 Mark









 









  

[flexcoders] Transitioning a popup?

2009-12-13 Thread criptopus
I have the following code:

mx:states
mx:State name=openRight
mx:SetProperty name=width value=670/
mx:AddChild relativeTo={controlbar1}

etc.

And I am trying to get it to transition to and from this state using...

mx:transitions
mx:Transition id=myTransition fromState=* toState=*
mx:Resize duration=400 target={this}/

I think I have the targeting wrong, any ideas as to what it should be or where 
I am going wrong?

- Stephen



Re: [flexcoders] Re: How to know when a popup component is visible?

2009-12-07 Thread Richard Rodseth
Bump. Still trying to find a way to detect that a popup is visible.

On Mon, Nov 30, 2009 at 9:55 AM, Richard Rodseth rrods...@gmail.com wrote:

 Yes, I have tried using callLater(). I was hoping there was an event I
 could tap into that got dispatched once the window is visible.


 On Mon, Nov 30, 2009 at 9:21 AM, Chris zomgfore...@gmail.com wrote:



 Everything is Flash is mostly single-threaded. You'll need to wait until
 after the window is visible to display start the encoding. Have you
 attempted using callLater() to start the encoding of the png a frame after
 the event is dispatched?


 On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@gmail.comwrote:



 This message hasn't showed up yet. Awaiting moderation? Any ideas?


 On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@gmail.comwrote:

 I had a thread going here about how to show progress before a
 potentially long-running but synchronous operation (in my case encoding a
 DisplayObject as  a PNG or JPEG to add to an AlivePDF PDF.

 Since I can't seem to force a busy cursor (ironic), one of the
 suggestions was to pop up a window before starting the encoding. But I've
 tried listening to creationComplete, render, show, addedToStage etc. etc.,
 and in all cases the popup doesn't appear until the encoding is complete.

 I was unable to find any event dispatched by the PopupManager either.

 Help!





  





[flexcoders] Re: How to know when a popup component is visible?

2009-12-07 Thread cuttenv



I'm guessing what you're trying to do is to create a popup, then display it, 
then start your encoding of the image?

The popup is a child of the system manager try adding your event

A popup is a child of the system manager try adding an child added 
eventlistener to it. 

--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:

 Bump. Still trying to find a way to detect that a popup is visible.
 
 On Mon, Nov 30, 2009 at 9:55 AM, Richard Rodseth rrods...@... wrote:
 
  Yes, I have tried using callLater(). I was hoping there was an event I
  could tap into that got dispatched once the window is visible.
 
 
  On Mon, Nov 30, 2009 at 9:21 AM, Chris zomgfore...@... wrote:
 
 
 
  Everything is Flash is mostly single-threaded. You'll need to wait until
  after the window is visible to display start the encoding. Have you
  attempted using callLater() to start the encoding of the png a frame after
  the event is dispatched?
 
 
  On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@...wrote:
 
 
 
  This message hasn't showed up yet. Awaiting moderation? Any ideas?
 
 
  On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@...wrote:
 
  I had a thread going here about how to show progress before a
  potentially long-running but synchronous operation (in my case encoding a
  DisplayObject as  a PNG or JPEG to add to an AlivePDF PDF.
 
  Since I can't seem to force a busy cursor (ironic), one of the
  suggestions was to pop up a window before starting the encoding. But I've
  tried listening to creationComplete, render, show, addedToStage etc. 
  etc.,
  and in all cases the popup doesn't appear until the encoding is complete.
 
  I was unable to find any event dispatched by the PopupManager either.
 
  Help!
 
 
 
 
 
   
 
 
 





RE: [flexcoders] Re: How to know when a popup component is visible?

2009-12-07 Thread Christopher McArthur
I was unable to find any way to do this either after a lot of experiment I 
finally gave up. A callLater after creationComplete, or any other of a host of 
events that it looks like you tried as well still happens before the popup is 
visible as you found.
I ended up just doing a timer of about 1s after creation complete, which is 
annoying and hacky, but the only reliable solution I could find =(

-ctm
 


_
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Richard Rodseth
Sent: Monday, December 07, 2009 2:43 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: How to know when a popup component is visible?

  
Bump. Still trying to find a way to detect that a popup is visible.
On Mon, Nov 30, 2009 at 9:55 AM, Richard Rodseth rrods...@gmail.com wrote:
Yes, I have tried using callLater(). I was hoping there was an event I could 
tap into that got dispatched once the window is visible.

On Mon, Nov 30, 2009 at 9:21 AM, Chris zomgfore...@gmail.com wrote:
  
Everything is Flash is mostly single-threaded. You'll need to wait until after 
the window is visible to display start the encoding. Have you attempted using 
callLater() to start the encoding of the png a frame after the event is 
dispatched?

On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@gmail.com wrote:
  
This message hasn't showed up yet. Awaiting moderation? Any ideas?

On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@gmail.com wrote:
I had a thread going here about how to show progress before a potentially 
long-running but synchronous operation (in my case encoding a DisplayObject as  
a PNG or JPEG to add to an AlivePDF PDF.

Since I can't seem to force a busy cursor (ironic), one of the suggestions was 
to pop up a window before starting the encoding. But I've tried listening to 
creationComplete, render, show, addedToStage etc. etc., and in all cases the 
popup doesn't appear until the encoding is complete.

I was unable to find any event dispatched by the PopupManager either.

Help!






Re: [flexcoders] Re: How to know when a popup component is visible?

2009-12-07 Thread Richard Rodseth
Yes, that's what I'm trying to do.

Listening to FlexEvent.ADD doesn't work - it happens pretty early in the
cycle.

Thanks.

On Mon, Dec 7, 2009 at 3:40 PM, cuttenv cutt...@yahoo.com wrote:





 I'm guessing what you're trying to do is to create a popup, then display
 it, then start your encoding of the image?

 The popup is a child of the system manager try adding your event

 A popup is a child of the system manager try adding an child added
 eventlistener to it.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard
 Rodseth rrods...@... wrote:
 
  Bump. Still trying to find a way to detect that a popup is visible.
 
  On Mon, Nov 30, 2009 at 9:55 AM, Richard Rodseth rrods...@... wrote:
 
   Yes, I have tried using callLater(). I was hoping there was an event I
   could tap into that got dispatched once the window is visible.
  
  
   On Mon, Nov 30, 2009 at 9:21 AM, Chris zomgfore...@... wrote:
  
  
  
   Everything is Flash is mostly single-threaded. You'll need to wait
 until
   after the window is visible to display start the encoding. Have you
   attempted using callLater() to start the encoding of the png a frame
 after
   the event is dispatched?
  
  
   On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@...wrote:

  
  
  
   This message hasn't showed up yet. Awaiting moderation? Any ideas?
  
  
   On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrodseth@
 ...wrote:

  
   I had a thread going here about how to show progress before a
   potentially long-running but synchronous operation (in my case
 encoding a
   DisplayObject as a PNG or JPEG to add to an AlivePDF PDF.
  
   Since I can't seem to force a busy cursor (ironic), one of the
   suggestions was to pop up a window before starting the encoding. But
 I've
   tried listening to creationComplete, render, show, addedToStage etc.
 etc.,
   and in all cases the popup doesn't appear until the encoding is
 complete.
  
   I was unable to find any event dispatched by the PopupManager
 either.
  
   Help!
  
  
  
  
  
  
  
  
  
 

  



Re: [flexcoders] Re: How to know when a popup component is visible?

2009-12-07 Thread Richard Rodseth
That just might have to do. Since I am saving the image using AlivePDF, I
have to initiate that from a click, so the window will have to say something
like Encoding... with a Save button that gets enabled once the encoding is
complete.

On Mon, Dec 7, 2009 at 3:41 PM, Christopher McArthur 
cmcart...@riotgames.com wrote:



 I was unable to find any way to do this either after a lot of experiment I
 finally gave up. A callLater after creationComplete, or any other of a host
 of events that it looks like you tried as well still happens before the
 popup is visible as you found.
 I ended up just doing a timer of about 1s after creation complete, which is
 annoying and hacky, but the only reliable solution I could find =(

 -ctm


 __
 From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of
 Richard Rodseth
 Sent: Monday, December 07, 2009 2:43 PM
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] Re: How to know when a popup component is
 visible?



 Bump. Still trying to find a way to detect that a popup is visible.
 On Mon, Nov 30, 2009 at 9:55 AM, Richard Rodseth 
 rrods...@gmail.comrrodseth%40gmail.com
 wrote:
 Yes, I have tried using callLater(). I was hoping there was an event I
 could tap into that got dispatched once the window is visible.

 On Mon, Nov 30, 2009 at 9:21 AM, Chris 
 zomgfore...@gmail.comzomgforeelz%40gmail.com
 wrote:

 Everything is Flash is mostly single-threaded. You'll need to wait until
 after the window is visible to display start the encoding. Have you
 attempted using callLater() to start the encoding of the png a frame after
 the event is dispatched?

 On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth 
 rrods...@gmail.comrrodseth%40gmail.com
 wrote:

 This message hasn't showed up yet. Awaiting moderation? Any ideas?

 On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth 
 rrods...@gmail.comrrodseth%40gmail.com
 wrote:
 I had a thread going here about how to show progress before a potentially
 long-running but synchronous operation (in my case encoding a DisplayObject
 as  a PNG or JPEG to add to an AlivePDF PDF.

 Since I can't seem to force a busy cursor (ironic), one of the suggestions
 was to pop up a window before starting the encoding. But I've tried
 listening to creationComplete, render, show, addedToStage etc. etc., and in
 all cases the popup doesn't appear until the encoding is complete.

 I was unable to find any event dispatched by the PopupManager either.

 Help!

  



[flexcoders] Re: How to know when a popup component is visible?

2009-11-30 Thread Richard Rodseth
This message hasn't showed up yet. Awaiting moderation? Any ideas?

On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@gmail.comwrote:

 I had a thread going here about how to show progress before a potentially
 long-running but synchronous operation (in my case encoding a DisplayObject
 as  a PNG or JPEG to add to an AlivePDF PDF.

 Since I can't seem to force a busy cursor (ironic), one of the suggestions
 was to pop up a window before starting the encoding. But I've tried
 listening to creationComplete, render, show, addedToStage etc. etc., and in
 all cases the popup doesn't appear until the encoding is complete.

 I was unable to find any event dispatched by the PopupManager either.

 Help!






Re: [flexcoders] Re: How to know when a popup component is visible?

2009-11-30 Thread Chris
Everything is Flash is mostly single-threaded. You'll need to wait until
after the window is visible to display start the encoding. Have you
attempted using callLater() to start the encoding of the png a frame after
the event is dispatched?

On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@gmail.com wrote:



 This message hasn't showed up yet. Awaiting moderation? Any ideas?


 On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@gmail.comwrote:

 I had a thread going here about how to show progress before a potentially
 long-running but synchronous operation (in my case encoding a DisplayObject
 as  a PNG or JPEG to add to an AlivePDF PDF.

 Since I can't seem to force a busy cursor (ironic), one of the suggestions
 was to pop up a window before starting the encoding. But I've tried
 listening to creationComplete, render, show, addedToStage etc. etc., and in
 all cases the popup doesn't appear until the encoding is complete.

 I was unable to find any event dispatched by the PopupManager either.

 Help!




  



Re: [flexcoders] Re: How to know when a popup component is visible?

2009-11-30 Thread Richard Rodseth
Yes, I have tried using callLater(). I was hoping there was an event I could
tap into that got dispatched once the window is visible.

On Mon, Nov 30, 2009 at 9:21 AM, Chris zomgfore...@gmail.com wrote:



 Everything is Flash is mostly single-threaded. You'll need to wait until
 after the window is visible to display start the encoding. Have you
 attempted using callLater() to start the encoding of the png a frame after
 the event is dispatched?


 On Mon, Nov 30, 2009 at 9:47 AM, Richard Rodseth rrods...@gmail.comwrote:



 This message hasn't showed up yet. Awaiting moderation? Any ideas?


 On Wed, Nov 25, 2009 at 10:40 AM, Richard Rodseth rrods...@gmail.comwrote:

 I had a thread going here about how to show progress before a potentially
 long-running but synchronous operation (in my case encoding a DisplayObject
 as  a PNG or JPEG to add to an AlivePDF PDF.

 Since I can't seem to force a busy cursor (ironic), one of the
 suggestions was to pop up a window before starting the encoding. But I've
 tried listening to creationComplete, render, show, addedToStage etc. etc.,
 and in all cases the popup doesn't appear until the encoding is complete.

 I was unable to find any event dispatched by the PopupManager either.

 Help!





  



[flexcoders] calling removeListener on a popup

2009-11-30 Thread steveb805
I have a mxml component based on TitleWindow that's used for a Popup. Nothing 
new there - big yawn goin your way.

I also have an addEventListener called on the object (so I can dispatch a 
custom event):

---

win = EditTaskBox(PopUpManager.createPopUp(this, EditTaskBox, true));
win.taskText.setFocus();
.
.
win.addEventListener(taskInputText, newTaskDialogBoxHandler);
--

So obviously, you want to call removeListener when you're done with the dialog, 
so I call removeEventListener in newTaskDialogBoxHandler(), in main.mxml, after 
I use the information from the custom event.

win.removeEventListener(taskInputText, newTaskDialogBoxHandler);


However, in the case of *cancelling* the dialog box, do I need to dispatch an 
event in this case as well, from within the component.?  

In my customer TitleWindow component, called EditTaskBox.mxml, for the 
closeButton handler, I call PopUpManager.removePopUp(this);

It's not like you can do: removeEventListener(..) here, since you're in a 
static component,right?  

Looks like I need to just create a meta declaration for a custom event, but 
obviously don't need a custom Event class or anything.

Just verifying this.
Thanks
Steve





RE: [flexcoders] calling removeListener on a popup

2009-11-30 Thread Alex Harui
The listener won't cause a memory leak.  The window now has a reference to the 
handler function not the other way around.

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 steveb805
Sent: Monday, November 30, 2009 2:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] calling removeListener on a popup



I have a mxml component based on TitleWindow that's used for a Popup. Nothing 
new there - big yawn goin your way.

I also have an addEventListener called on the object (so I can dispatch a 
custom event):

---

win = EditTaskBox(PopUpManager.createPopUp(this, EditTaskBox, true));
win.taskText.setFocus();
.
.
win.addEventListener(taskInputText, newTaskDialogBoxHandler);
--

So obviously, you want to call removeListener when you're done with the dialog, 
so I call removeEventListener in newTaskDialogBoxHandler(), in main.mxml, after 
I use the information from the custom event.

win.removeEventListener(taskInputText, newTaskDialogBoxHandler);

However, in the case of *cancelling* the dialog box, do I need to dispatch an 
event in this case as well, from within the component.?

In my customer TitleWindow component, called EditTaskBox.mxml, for the 
closeButton handler, I call PopUpManager.removePopUp(this);

It's not like you can do: removeEventListener(..) here, since you're in a 
static component,right?

Looks like I need to just create a meta declaration for a custom event, but 
obviously don't need a custom Event class or anything.

Just verifying this.
Thanks
Steve



[flexcoders] How to know when a popup component is visible?

2009-11-25 Thread Richard Rodseth
I had a thread going here about how to show progress before a potentially
long-running but synchronous operation (in my case encoding a DisplayObject
as  a PNG or JPEG to add to an AlivePDF PDF.

Since I can't seem to force a busy cursor (ironic), one of the suggestions
was to pop up a window before starting the encoding. But I've tried
listening to creationComplete, render, show, addedToStage etc. etc., and in
all cases the popup doesn't appear until the encoding is complete.

I was unable to find any event dispatched by the PopupManager either.

Help!


[flexcoders] Re: Nested PopUp and Mouse_Down_Outside event

2009-11-11 Thread johncch85
Thank you for the suggestion. I looked at the event class and it would be quite 
tedious just to trap the mouse down event because of the need to traverse the 
owner chain.

what I need to do is just to stop the mouse down event from bubbling up the 
chain.

In the end I solved this problem by replacing the combobox with a popupbutton 
and list combination.

Thanks!

regards,
CH

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 The event.relatedObject should be the object hit.  If you hit the dropdown 
 and check its owner property, you should end up back at the ComboBox
 
 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 johncch85
 Sent: Tuesday, November 10, 2009 12:38 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Nested PopUp and Mouse_Down_Outside event
 
 
 
 Hi,
 
 I'm trying to solve this problem here and I'd like to ask if anyone has any 
 suggestions?
 
 I have a panel instance that is contextual and will be shown by the 
 popupmanager when the user clicks on a button. To facilitate auto hiding when 
 the user clicks outside the panel, I'm using the 
 FlexMouseEvent.MOUSE_DOWN_OUTSIDE to trap the event and close the popup.
 
 I have a custom component inside this panel that uses a pop up similar to the 
 date field. The custom component utilizes a class that extends UIComponent 
 which acts as a popup to select an input value that will fill in to a 
 textbox. The principle of operation is totally similar to that of the 
 datefield. Unfortunately, this custom component has a few combo boxes inside.
 
 The main problem happens because of the listening of the MOUSE_DOWN_OUTSIDE 
 event in the parent panel. I am able to stop the event from happening by 
 preventing the mousedown events from the inner popup from bubbling up the 
 display chain. The only thing I am unable to deal with is the bubbling up of 
 the event when the user clicks the combobox dropdown which is the list item. 
 From my understanding, it is handled by a separate popupmanager hence the 
 event is not bubbled up the panel display chain.
 
 Is there any solution or any way around this? If not I'll have to switch the 
 combo boxes with some other components, which I would like to avoid as I feel 
 that the combobox presents the least clicks to the users.
 
 Thank you!





Re: [flexcoders] Passing values from popup window to MXML component

2009-11-11 Thread Funand Learning
Hi,

I have written a function and after checking the username and password, to 
toggle the buttons, but I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.

Here is the function I wrote

public function checkCredentials():void {
if(loginWin1.userInput.text == 'funandlearning'  
loginWin1.passwordInput.text == 'funandlearning')
{
Alert.show(Login Successful);
PopUpManager.removePopUp(loginWin1);
//var main:Main = new Main();
main.logout.visible = false;
}
else
{
Alert.show('Try again');
PopUpManager.removePopUp(loginWin1);
}
}

LoginPopUp contains the code for displaying on the popupwindow, and Main is 
another component which contains code for calling popup window and it contain 
other UI code for header. Is this the right way to do?

Thanks





From: Omotola Anjorin shot2f...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Mon, November 9, 2009 6:33:48 AM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

   
Yeah you can do what rohit said by adding a logout button at the same place and 
toggling the visiblity.

This way,


From you main application you can do something like this.


if(loginWin. userInput. text=='funandlearni ng'  loginWin.passwordIn 
put.text= ='funandlearning' )
{
Alert.show( Login Successful) ;
loginWin.loginButto n.visible = false
 loginWin.logoutButt on.visible = true
}

You can also use the same button but play around the text property.

Cheers



From: Rohit Sharma rohit.sharma1982@ gmail.com
To: flexcod...@yahoogro ups.com
Sent: Mon, November 9, 2009 12:21:02 PM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

  
  You can add a logout button at the same place as login button and toggle the 
visibilities of these buttons depending upon the
   state of your component.

   


On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning funandlearning3@ yahoo.com 
wrote:














  


 
  
 
Hello All,

I was trying to create a login Page. The page has one main MXML application 
file with couple of MXML components. The First component contains the 
following:

Component1.mxml:

?xml version=1.0 encoding=utf- 8?

width=60% height=261

mx:Script
![CDATA[
import mx.managers. PopUpManager;
import mx.controls. Alert;
import
 components.LoginPop Up;
import mx.events.CloseEven t;

public var loginWin:LoginPopUp ;

private function loginHandler( ):void {
loginWin = new LoginPopUp() ;
loginWin.addEventLi stener(CloseEven t.CLOSE,closeHan dler);
PopUpManager. addPopUp( loginWin, this,true) ;
PopUpManager. centerPopUp( loginWin) ;
   
 
}

public function closeHandler( event:CloseEvent ):void
{
PopUpManager. removePopUp( loginWin) ;

}


public function checkCredentials( ):void{

   
 if(loginWin. userInput. text=='funandlearni ng'  loginWin.passwordIn 
 put.text= ='funandlearning' )
{
Alert.show( Login Successful) ;

}
else
{
Alert.show( Login Failed);
}
}
   
 

]]
/mx:Script



mx:HBox width=90% height=55 borderColor= #F85023 id=headerButtons
borderStyle= outset horizontalAlign= left verticalAlign= middle
backgroundColor= #938480
mx:Spacer width=10%/
mx:Button id=loginMain label=Login click=loginHandler ( )/
mx:Button id=logout label=LogOut /
/mx:HBox

mx:HBox width=100% height=82%
mx:HBox width=25%
 height=82% borderStyle= outset borderColor= #F85023
/mx:HBox
mx:HBox width=65% height=82% borderColor= #F85023 borderStyle= 
 outset
/mx:HBox
/mx:HBox
/mx:VBox

component2.mxml has the following code for the popup

?xml version=1.0 encoding=utf- 8?

xmlns:main= components. * layout=vertical
  title=Please login showCloseButton= true

!-- defined state to toggle between register and login
 --
mx:states
mx:State name=Register basedOn=
mx:AddChild relativeTo= {loginForm} 
 position=lastChild  creationPolicy= all
mx:FormItem label=Email
mx:TextInput id=email

RE: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component

2009-11-11 Thread Tracy Spratt
What reference is null?

 

Yes, that architecture is common.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Funand Learning
Sent: Wednesday, November 11, 2009 12:07 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] Re: [flexcoders] Passing values from popup window to MXML
component

 

  

Hi,

I have written a function and after checking the username and password, to
toggle the buttons, but I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object
reference.

Here is the function I wrote

public function checkCredentials():void {
if(loginWin1.userInput.text == 'funandlearning' 
loginWin1.passwordInput.text == 'funandlearning')
{
Alert.show(Login Successful);
PopUpManager.removePopUp(loginWin1);
//var main:Main = new Main();
main.logout.visible = false;
}
else
{
Alert.show('Try again');
PopUpManager.removePopUp(loginWin1);
}
}

LoginPopUp contains the code for displaying on the popupwindow, and Main is
another component which contains code for calling popup window and it
contain other UI code for header. Is this the right way to do?

Thanks

 

  _  

From: Omotola Anjorin shot2f...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Mon, November 9, 2009 6:33:48 AM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

  

Yeah you can do what rohit said by adding a logout button at the same place
and toggling the visiblity.

This way,


From you main application you can do something like this.


if(loginWin. userInput. text=='funandlearni ng'  loginWin.passwordIn
put.text= ='funandlearning' )
{
Alert.show( Login Successful) ;
loginWin.loginButto n.visible = false
loginWin.logoutButt on.visible = true
}

You can also use the same button but play around the text property.

Cheers

  _  

From: Rohit Sharma rohit.sharma1982@ gmail.com
To: flexcod...@yahoogro ups.com
Sent: Mon, November 9, 2009 12:21:02 PM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

  

  You can add a logout button at the same place as login button and toggle
the visibilities of these buttons depending upon the
   state of your component.

   

On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning funandlearning3@ yahoo.com
mailto:funandlearni...@yahoo.com  wrote:

  

Hello All,

I was trying to create a login Page. The page has one main MXML application
file with couple of MXML components. The First component contains the
following:

Component1.mxml:

?xml version=1.0 encoding=utf- 8?

width=60% height=261

mx:Script
![CDATA[
import mx.managers. PopUpManager;
import mx.controls. Alert;
import components.LoginPop Up;
import mx.events.CloseEven t;

public var loginWin:LoginPopUp ;

private function loginHandler( ):void {
loginWin = new LoginPopUp() ;
loginWin.addEventLi stener(CloseEven t.CLOSE,closeHan dler);
PopUpManager. addPopUp( loginWin, this,true) ;
PopUpManager. centerPopUp( loginWin) ;

}

public function closeHandler( event:CloseEvent ):void
{
PopUpManager. removePopUp( loginWin) ;

}


public function checkCredentials( ):void{

if(loginWin. userInput. text=='funandlearni ng' 
loginWin.passwordIn put.text= ='funandlearning' )
{
Alert.show( Login Successful) ;

}
else
{
Alert.show( Login Failed);
}
}


]]
/mx:Script



mx:HBox width=90% height=55 borderColor= #F85023
id=headerButtons
borderStyle= outset horizontalAlign= left verticalAlign=
middle
backgroundColor= #938480
mx:Spacer width=10%/
mx:Button id=loginMain label=Login click=loginHandler ( )/
mx:Button id=logout label=LogOut /
/mx:HBox

mx:HBox width=100% height=82%
mx:HBox width=25% height=82% borderStyle= outset borderColor=
#F85023
/mx:HBox
mx:HBox width=65% height=82% borderColor= #F85023
borderStyle= outset
/mx:HBox
/mx:HBox
/mx:VBox

component2.mxml has the following code for the popup

?xml version=1.0 encoding=utf- 8?

xmlns:main= components. * layout=vertical
  title=Please login

[flexcoders] Nested PopUp and Mouse_Down_Outside event

2009-11-10 Thread johncch85
Hi,

I'm trying to solve this problem here and I'd like to ask if anyone has any 
suggestions?

I have a panel instance that is contextual and will be shown by the 
popupmanager when the user clicks on a button. To facilitate auto hiding when 
the user clicks outside the panel, I'm using the 
FlexMouseEvent.MOUSE_DOWN_OUTSIDE to trap the event and close the popup.

I have a custom component inside this panel that uses a pop up similar to the 
date field. The custom component utilizes a class that extends UIComponent 
which acts as a popup to select an input value that will fill in to a 
textbox. The principle of operation is totally similar to that of the 
datefield. Unfortunately, this custom component has a few combo boxes inside.

The main problem happens because of the listening of the MOUSE_DOWN_OUTSIDE 
event in the parent panel. I am able to stop the event from happening by 
preventing the mousedown events from the inner popup from bubbling up the 
display chain. The only thing I am unable to deal with is the bubbling up of 
the event when the user clicks the combobox dropdown which is the list item. 
From my understanding, it is handled by a separate popupmanager hence the event 
is not bubbled up the panel display chain.

Is there any solution or any way around this? If not I'll have to switch the 
combo boxes with some other components, which I would like to avoid as I feel 
that the combobox presents the least clicks to the users.

Thank you!



RE: [flexcoders] Nested PopUp and Mouse_Down_Outside event

2009-11-10 Thread Alex Harui
The event.relatedObject should be the object hit.  If you hit the dropdown and 
check its owner property, you should end up back at the ComboBox

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 johncch85
Sent: Tuesday, November 10, 2009 12:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Nested PopUp and Mouse_Down_Outside event



Hi,

I'm trying to solve this problem here and I'd like to ask if anyone has any 
suggestions?

I have a panel instance that is contextual and will be shown by the 
popupmanager when the user clicks on a button. To facilitate auto hiding when 
the user clicks outside the panel, I'm using the 
FlexMouseEvent.MOUSE_DOWN_OUTSIDE to trap the event and close the popup.

I have a custom component inside this panel that uses a pop up similar to the 
date field. The custom component utilizes a class that extends UIComponent 
which acts as a popup to select an input value that will fill in to a 
textbox. The principle of operation is totally similar to that of the 
datefield. Unfortunately, this custom component has a few combo boxes inside.

The main problem happens because of the listening of the MOUSE_DOWN_OUTSIDE 
event in the parent panel. I am able to stop the event from happening by 
preventing the mousedown events from the inner popup from bubbling up the 
display chain. The only thing I am unable to deal with is the bubbling up of 
the event when the user clicks the combobox dropdown which is the list item. 
From my understanding, it is handled by a separate popupmanager hence the event 
is not bubbled up the panel display chain.

Is there any solution or any way around this? If not I'll have to switch the 
combo boxes with some other components, which I would like to avoid as I feel 
that the combobox presents the least clicks to the users.

Thank you!



RE: [SPAM] Re: [flexcoders] Passing values from popup window to MXML component

2009-11-10 Thread Tracy Spratt
Or use states.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Omotola Anjorin
Sent: Monday, November 09, 2009 7:34 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] Re: [flexcoders] Passing values from popup window to MXML
component

 

  

Yeah you can do what rohit said by adding a logout button at the same place
and toggling the visiblity.

This way,

From you main application you can do something like this.


if(loginWin. userInput. text=='funandlearning'  loginWin.passwordIn
put.text= ='funandlearning')
{
Alert.show(Login Successful);
loginWin.loginButton.visible = false
loginWin.logoutButton.visible = true
}

You can also use the same button but play around the text property.

Cheers

  _  

From: Rohit Sharma rohit.sharma1...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, November 9, 2009 12:21:02 PM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

  

  You can add a logout button at the same place as login button and toggle
the visibilities of these buttons depending upon the
   state of your component.

   

On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning funandlearning3@ yahoo.com
mailto:funandlearni...@yahoo.com  wrote:

  

Hello All,

I was trying to create a login Page. The page has one main MXML application
file with couple of MXML components. The First component contains the
following:

Component1.mxml:

?xml version=1.0 encoding=utf-8?

width=60% height=261

mx:Script
![CDATA[
import mx.managers. PopUpManager;
import mx.controls. Alert;
import components.LoginPop Up;
import mx.events.CloseEven t;

public var loginWin:LoginPopUp ;

private function loginHandler( ):void {
loginWin = new LoginPopUp() ;
loginWin.addEventLi stener(CloseEven t.CLOSE,closeHan dler);
PopUpManager. addPopUp( loginWin, this,true) ;
PopUpManager. centerPopUp( loginWin) ;

}

public function closeHandler( event:CloseEvent ):void
{
PopUpManager. removePopUp( loginWin) ;

}


public function checkCredentials( ):void{

if(loginWin. userInput. text=='funandlearning' 
loginWin.passwordIn put.text= ='funandlearning')
{
Alert.show(Login Successful);

}
else
{
Alert.show(Login Failed);
}
}


]]
/mx:Script



mx:HBox width=90% height=55 borderColor=#F85023
id=headerButtons
borderStyle=outset horizontalAlign=left verticalAlign=middle
backgroundColor=#938480
mx:Spacer width=10%/
mx:Button id=loginMain label=Login click=loginHandler( )/
mx:Button id=logout label=LogOut /
/mx:HBox

mx:HBox width=100% height=82%
mx:HBox width=25% height=82% borderStyle=outset
borderColor=#F85023
/mx:HBox
mx:HBox width=65% height=82% borderColor=#F85023
borderStyle=outset
/mx:HBox
/mx:HBox
/mx:VBox

component2.mxml has the following code for the popup

?xml version=1.0 encoding=utf-8?

xmlns:main=components.* layout=vertical
  title=Please login showCloseButton=true

!-- defined state to toggle between register and login --
mx:states
mx:State name=Register basedOn=
mx:AddChild relativeTo={loginForm}
 position=lastChild creationPolicy=all
mx:FormItem label=Email
mx:TextInput id=email/
/mx:FormItem
/mx:AddChild

mx:SetProperty target={loginButton} name=label
value=Register/
mx:RemoveChild target={registerLink}/

mx:AddChild relativeTo={linkSpacer} position=before
mx:LinkButton label=Return to Login
click=currentState='';this.title='Please Login'/
/mx:AddChild
/mx:State
/mx:states
mx:Script
![CDATA[
import mx.events.CloseEven t;
import mx.managers. PopUpManager;
import mx.controls. Alert;


]]
/mx:Script
mx:Form id=loginForm
mx:FormItem label=Username:
mx:TextInput id=userInput/
/mx:FormItem
mx:FormItem label=Password:
mx:TextInput id=passwordInput displayAsPassword=true/
/mx:FormItem

/mx:Form
mx:ControlBar
 mx:LinkButton 
label=Need to Register? id=registerLink

[flexcoders] Passing values from popup window to MXML component

2009-11-09 Thread Funand Learning
Hello All,

I was trying to create a login Page. The page has one main MXML application 
file with couple of MXML components. The First component contains the following:

Component1.mxml:

?xml version=1.0 encoding=utf-8?

width=60% height=261

mx:Script
![CDATA[
import mx.managers.PopUpManager;
import mx.controls.Alert;
import components.LoginPopUp;
import mx.events.CloseEvent;

public var loginWin:LoginPopUp;

private function loginHandler():void {
loginWin = new LoginPopUp();
loginWin.addEventListener(CloseEvent.CLOSE,closeHandler);
PopUpManager.addPopUp(loginWin,this,true);
PopUpManager.centerPopUp(loginWin);

}

public function closeHandler(event:CloseEvent):void
{
PopUpManager.removePopUp(loginWin);

}


public function checkCredentials():void{

if(loginWin.userInput.text=='funandlearning'  
loginWin.passwordInput.text=='funandlearning')
{
Alert.show(Login Successful);

}
else
{
Alert.show(Login Failed);
}
}


]]
/mx:Script



mx:HBox width=90% height=55 borderColor=#F85023 id=headerButtons
borderStyle=outset horizontalAlign=left verticalAlign=middle
backgroundColor=#938480
mx:Spacer width=10%/
mx:Button id=loginMain label=Login click=loginHandler()/
mx:Button id=logout label=LogOut /
/mx:HBox

mx:HBox width=100% height=82%
mx:HBox width=25% height=82% borderStyle=outset 
borderColor=#F85023
/mx:HBox
mx:HBox width=65% height=82% borderColor=#F85023 
borderStyle=outset
/mx:HBox
/mx:HBox
/mx:VBox

component2.mxml has the following code for the popup

?xml version=1.0 encoding=utf-8?

xmlns:main=components.* layout=vertical
  title=Please login showCloseButton=true

!-- defined state to toggle between register and login --
mx:states
mx:State name=Register basedOn=
mx:AddChild relativeTo={loginForm}
 position=lastChild creationPolicy=all
mx:FormItem label=Email
mx:TextInput id=email/
/mx:FormItem
/mx:AddChild

mx:SetProperty target={loginButton} name=label 
value=Register/
mx:RemoveChild target={registerLink}/

mx:AddChild relativeTo={linkSpacer} position=before
mx:LinkButton label=Return to Login 
click=currentState='';this.title='Please Login'/
/mx:AddChild
/mx:State
/mx:states
mx:Script
![CDATA[
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import mx.controls.Alert;


]]
/mx:Script
mx:Form id=loginForm
mx:FormItem label=Username:
mx:TextInput id=userInput/
/mx:FormItem
mx:FormItem label=Password:
mx:TextInput id=passwordInput displayAsPassword=true/
/mx:FormItem

/mx:Form
mx:ControlBar
 mx:LinkButton 
label=Need to Register? id=registerLink
click=currentState='Register';this.title='Register'
/
mx:Spacer width=100% id=linkSpacer/
mx:Button label=Login id=loginButton click=checkCredentials()/
mx:Button label=Cancel click=PopUpManager.removePopUp(this)/
/mx:ControlBar

/mx:TitleWindow

I need help in knowing how to change the login button in component1.mxml to 
logout button when the login functionaility from the popuup window is successful

Thanks.



  

Re: [flexcoders] Passing values from popup window to MXML component

2009-11-09 Thread Rohit Sharma
  You can add a logout button at the same place as login button and toggle
the visibilities of these buttons depending upon the
   state of your component.



On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning
funandlearni...@yahoo.comwrote:



 Hello All,

 I was trying to create a login Page. The page has one main MXML application
 file with couple of MXML components. The First component contains the
 following:

 Component1.mxml:

 ?xml version=1.0 encoding=utf-8?

 width=60% height=261

 mx:Script
 ![CDATA[
 import mx.managers.PopUpManager;
 import mx.controls.Alert;
 import components.LoginPopUp;
 import mx.events.CloseEvent;

 public var loginWin:LoginPopUp;

 private function loginHandler():void {
 loginWin = new LoginPopUp();
 loginWin.addEventListener(CloseEvent.CLOSE,closeHandler);
 PopUpManager.addPopUp(loginWin,this,true);
 PopUpManager.centerPopUp(loginWin);

 }

 public function closeHandler(event:CloseEvent):void
 {
 PopUpManager.removePopUp(loginWin);

 }


 public function checkCredentials():void{

 if(loginWin.userInput.text=='funandlearning' 
 loginWin.passwordInput.text=='funandlearning')
 {
 Alert.show(Login Successful);

 }
 else
 {
 Alert.show(Login Failed);
 }
 }


 ]]
 /mx:Script



 mx:HBox width=90% height=55 borderColor=#F85023
 id=headerButtons
 borderStyle=outset horizontalAlign=left verticalAlign=middle
 backgroundColor=#938480
 mx:Spacer width=10%/
 mx:Button id=loginMain label=Login click=loginHandler()/
 mx:Button id=logout label=LogOut /
 /mx:HBox

 mx:HBox width=100% height=82%
 mx:HBox width=25% height=82% borderStyle=outset
 borderColor=#F85023
 /mx:HBox
 mx:HBox width=65% height=82% borderColor=#F85023
 borderStyle=outset
 /mx:HBox
 /mx:HBox
 /mx:VBox

 component2.mxml has the following code for the popup

 ?xml version=1.0 encoding=utf-8?

 xmlns:main=components.* layout=vertical
   title=Please login showCloseButton=true

 !-- defined state to toggle between register and login --
 mx:states
 mx:State name=Register basedOn=
 mx:AddChild relativeTo={loginForm}
  position=lastChild creationPolicy=all
 mx:FormItem label=Email
 mx:TextInput id=email/
 /mx:FormItem
 /mx:AddChild

 mx:SetProperty target={loginButton} name=label
 value=Register/
 mx:RemoveChild target={registerLink}/

 mx:AddChild relativeTo={linkSpacer} position=before
 mx:LinkButton label=Return to Login
 click=currentState='';this.title='Please Login'/
 /mx:AddChild
 /mx:State
 /mx:states
 mx:Script
 ![CDATA[
 import mx.events.CloseEvent;
 import mx.managers.PopUpManager;
 import mx.controls.Alert;


 ]]
 /mx:Script
 mx:Form id=loginForm
 mx:FormItem label=Username:
 mx:TextInput id=userInput/
 /mx:FormItem
 mx:FormItem label=Password:
 mx:TextInput id=passwordInput displayAsPassword=true/
 /mx:FormItem

 /mx:Form
 mx:ControlBar
  mx:LinkButton
 label=Need to Register? id=registerLink
 click=currentState='Register';this.title='Register'
 /
 mx:Spacer width=100% id=linkSpacer/
 mx:Button label=Login id=loginButton
 click=checkCredentials()/
 mx:Button label=Cancel click=PopUpManager.removePopUp(this)/
 /mx:ControlBar

 /mx:TitleWindow

 I need help in knowing how to change the login button in component1.mxml to
 logout button when the login functionaility from the popuup window is
 successful

 Thanks.

  



Re: [flexcoders] Passing values from popup window to MXML component

2009-11-09 Thread Omotola Anjorin
Yeah you can do what rohit said by adding a logout button at the same place and 
toggling the visiblity.

This way,

From you main application you can do something like this.


if(loginWin. userInput. text=='funandlearning'  loginWin.passwordIn 
put.text= ='funandlearning')
{
Alert.show(Login Successful);
loginWin.loginButton.visible = false
 loginWin.logoutButton.visible = true
}

You can also use the same button but play around the text property.

Cheers



From: Rohit Sharma rohit.sharma1...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Mon, November 9, 2009 12:21:02 PM
Subject: Re: [flexcoders] Passing values from popup window to MXML component

  
  You can add a logout button at the same place as login button and toggle the 
visibilities of these buttons depending upon the
   state of your component.

   


On Mon, Nov 9, 2009 at 9:58 AM, Funand Learning funandlearning3@ yahoo.com 
wrote:














  


 
  
 
Hello All,

I was trying to create a login Page. The page has one main MXML application 
file with couple of MXML components. The First component contains the 
following:

Component1.mxml:

?xml version=1.0 encoding=utf-8?

width=60% height=261

mx:Script
![CDATA[
import mx.managers. PopUpManager;
import mx.controls. Alert;
import
 components.LoginPop Up;
import mx.events.CloseEven t;

public var loginWin:LoginPopUp ;

private function loginHandler( ):void {
loginWin = new LoginPopUp() ;
loginWin.addEventLi stener(CloseEven t.CLOSE,closeHan dler);
PopUpManager. addPopUp( loginWin, this,true) ;
PopUpManager. centerPopUp( loginWin) ;
   
 
}

public function closeHandler( event:CloseEvent ):void
{
PopUpManager. removePopUp( loginWin) ;

}


public function checkCredentials( ):void{

   
 if(loginWin. userInput. text=='funandlearning'  loginWin.passwordIn 
 put.text= ='funandlearning')
{
Alert.show(Login Successful);

}
else
{
Alert.show(Login Failed);
}
}
   
 

]]
/mx:Script



mx:HBox width=90% height=55 borderColor=#F85023 id=headerButtons
borderStyle=outset horizontalAlign=left verticalAlign=middle
backgroundColor=#938480
mx:Spacer width=10%/
mx:Button id=loginMain label=Login click=loginHandler( )/
mx:Button id=logout label=LogOut /
/mx:HBox

mx:HBox width=100% height=82%
mx:HBox width=25%
 height=82% borderStyle=outset borderColor=#F85023
/mx:HBox
mx:HBox width=65% height=82% borderColor=#F85023 
 borderStyle=outset
/mx:HBox
/mx:HBox
/mx:VBox

component2.mxml has the following code for the popup

?xml version=1.0 encoding=utf-8?

xmlns:main=components.* layout=vertical
  title=Please login showCloseButton=true

!-- defined state to toggle between register and login
 --
mx:states
mx:State name=Register basedOn=
mx:AddChild relativeTo={loginForm}
 position=lastChild creationPolicy=all
mx:FormItem label=Email
mx:TextInput id=email/
/mx:FormItem
/mx:AddChild

mx:SetProperty
 target={loginButton} name=label value=Register/
mx:RemoveChild target={registerLink}/

mx:AddChild relativeTo={linkSpacer} position=before
mx:LinkButton label=Return to Login 
 click=currentState='';this.title='Please Login'/
/mx:AddChild
/mx:State
/mx:states
mx:Script
![CDATA[
import
 mx.events.CloseEven t;
import mx.managers. PopUpManager;
import mx.controls. Alert;


]]
/mx:Script
mx:Form id=loginForm
mx:FormItem label=Username:
mx:TextInput id=userInput/
/mx:FormItem
mx:FormItem label=Password:
mx:TextInput id=passwordInput displayAsPassword=true/
   
 /mx:FormItem

/mx:Form
mx:ControlBar
 mx:LinkButton 
label=Need to Register? id=registerLink
click=currentState='Register';this.title='Register'
/
mx:Spacer width=100% id=linkSpacer/
mx:Button label=Login id=loginButton click=checkCredentials( )/
mx:Button label=Cancel click=PopUpManager. removePopUp( this)/
/mx:ControlBar

/mx:TitleWindow

I need help

[flexcoders] Allow popup windows

2009-10-30 Thread Christophe
Hello, 

Is it possible to setup the option : allow popup window in the navigator from a 
flex application ? 

Thank you,
Christophe, 



RE: [flexcoders] Allow popup windows

2009-10-30 Thread Alex Harui
Flex does not provide a way to get around popup blockers. But you can put up 
your own Flex popups within the application/browser.

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 Christophe
Sent: Friday, October 30, 2009 2:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Allow popup windows



Hello,

Is it possible to setup the option : allow popup window in the navigator from a 
flex application ?

Thank you,
Christophe,



[flexcoders] launching popup TitleWindow from a reused mxml component

2009-10-24 Thread Tim Romano
I posted a question the other day about how to prevent a popup from being 
dragged outside the bounds of the application window. Since I'm fairly new at 
Flex, some obvious things are not immediately obvious to me.

I think my popup window can be dragged outside the main application window 
because this in my method call below:

PopUpManager.addPopUp(popwin, this, true);

actually refers to an isntance of my (reusable) mxml component  which is 
launching the popup, not to the main application window.  If the parent 
DisplayObject referred to by this is not the main application window, is the 
default behavior that the popup can be dragged outside the main application 
window?

Thanks

[flexcoders] How to set focus to a control in a popup when activated

2009-10-21 Thread reflexactions
How can I set focus to a particular control in a container whenever it it first 
gets poped up.

However after the user has clicked in some other control I want focus to go to 
the control they last clicked in if the window gets deactivated and activated.



[flexcoders] Re: popup window send event to main screen

2009-10-19 Thread Netaman
Yes you can, A quick overview - Create an Event meta tag  
create a class for the meta event that extends the Event and 
then dispatch your event that bubbles to the main application 
from your popup.

read here;
http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html

Of course if you are looking to create flex software that incorporates events 
then read the rest of the message.

You might want to look at a framework like puremvc, or a more complex framework 
like cairngorm, these use an more complex event driven model, view, controller, 
I personally keep it simple and apply a easyMVC architecture. Anyone can make 
it complex, keeping it simple is Genius. By keeping it simple I can apply my 
own algorithms to software development having used for the last 27 plus years 
of on the job training.

read on if you want my candid opinion about frameworks.

So when you look at a programming model and it looks simple then you have the 
freedom to think outside the box, some software industry pundits have placed a 
big giant box in front of you saying learn this to solve the whatever comes up 
in the everyday software development, basically placing you inside a box, just 
a bigger box, saying this will lead you to quicker development, share the same 
core logic between programs, so on and so forth, but if you look closely enough 
and see that all their patterns and verbiage is just the framework a learning 
exercise, nothing wrong with learning, use what you like and discard the rest. 

The biggest pattern to solving the software development algorithms of tomorrow 
and today is on a web search engine page, I have found that by searching the 
web it's the biggest pattern solver of them all, better then any framework. I 
am more a web research software developer then software developer, design and 
function from a web search to figuring out the next software steps. 

The one thing I see the industry doing is following a framework, thinking it to 
be the greatest thing since bytes came in a core, but they miss the point, that 
by making pointless framework constructs/ additions to a software architecture 
they have diluted the meaning of the framework, making it hard to grow, making 
it complex.

No one person or group of persons has the intelligence to lead you down a path 
of programming enlightenment, just a bunch of software developers that dream in 
code. 

Randy





--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 Hi,
 
 Do you think if it is possible for popup Flex window to send event to main 
 Application screen?
 
 Thanks
 
 Mark





[flexcoders] popup window send event to main screen

2009-10-16 Thread markflex2007
Hi,

Do you think if it is possible for popup Flex window to send event to main 
Application screen?

Thanks

Mark



[flexcoders] Re: popup window send event to main screen

2009-10-16 Thread valdhor
Yes you can.

Add an event listener to the systemManager of the application. systemManager is 
the owner for popup windows.

--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 Hi,
 
 Do you think if it is possible for popup Flex window to send event to main 
 Application screen?
 
 Thanks
 
 Mark





[flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread flexaustin
So I swapped out Box with s:Panel as the base of my custom component. If I 
don't set set height or width in my component then Flash freezes and says the 
script is running longer than 15 seconds. Also this same thing happened when I 
was using mx:Box as the base of my component.  This is happening without me 
overriding any of the measure, commitProperties, etc... functoins. Any 
suggestions?

Jason



--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Popups are a special case.  Panel/TitleWindow know when they've been popped 
 up and resize themselves.  You'll have to teach your Box to do the same.
 
 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 flexaustin
 Sent: Thursday, October 08, 2009 2:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Custom PopUp not resizing.
 
 
 
 I have a custom popup based on mx:Box. In it I have a dropdown. In this list 
 dropdown you can select multiple items that once items are selected they stay 
 in the dropdowns selected box (think multiselect combobo box). My custom pop 
 has a width and height set to 300 by 300;
 
 Anyway, when I select several items the pop (not the dropdownlist) starts 
 adding scrollbars when there are to many. If I set the horizontalscrollpolicy 
 and verticallscrollpolicy to off then the pop start moving out of what looks 
 like the popups viewablearea/scrollRect?
 So as the selecteditems in my dropdown gets longer the top of the popup start 
 disappearing?
 
 Does the popupmanager need to know to increase its viewable area for the 
 popup? Or is it possible to have a popup increase in size?





RE: [flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread Alex Harui
Maybe you're measured size doesn't match the size you're setting, or maybe the 
setting of the size causes something to be invalidated and go through the whole 
sizing pass again.  Setting breakpoints in LayoutManager can help you find the 
problem.

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 flexaustin
Sent: Friday, October 09, 2009 9:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom PopUp not resizing.



So I swapped out Box with s:Panel as the base of my custom component. If I 
don't set set height or width in my component then Flash freezes and says the 
script is running longer than 15 seconds. Also this same thing happened when I 
was using mx:Box as the base of my component. This is happening without me 
overriding any of the measure, commitProperties, etc... functoins. Any 
suggestions?

Jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Popups are a special case. Panel/TitleWindow know when they've been popped up 
 and resize themselves. You'll have to teach your Box to do the same.

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

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Thursday, October 08, 2009 2:07 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Custom PopUp not resizing.



 I have a custom popup based on mx:Box. In it I have a dropdown. In this list 
 dropdown you can select multiple items that once items are selected they stay 
 in the dropdowns selected box (think multiselect combobo box). My custom pop 
 has a width and height set to 300 by 300;

 Anyway, when I select several items the pop (not the dropdownlist) starts 
 adding scrollbars when there are to many. If I set the horizontalscrollpolicy 
 and verticallscrollpolicy to off then the pop start moving out of what looks 
 like the popups viewablearea/scrollRect?
 So as the selecteditems in my dropdown gets longer the top of the popup start 
 disappearing?

 Does the popupmanager need to know to increase its viewable area for the 
 popup? Or is it possible to have a popup increase in size?




[flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread flexaustin
Thanks, Alex.  The issue was setting width and height so my override measure 
was never getting called.  And I had a couple of component referencing/bound 
{this.width} and {this.height} caused some kind of infinite loop or something?

Set all to minWidth and minHeight all works now.

Jason



--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Maybe you're measured size doesn't match the size you're setting, or maybe 
 the setting of the size causes something to be invalidated and go through the 
 whole sizing pass again.  Setting breakpoints in LayoutManager can help you 
 find the problem.
 
 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 flexaustin
 Sent: Friday, October 09, 2009 9:04 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Custom PopUp not resizing.
 
 
 
 So I swapped out Box with s:Panel as the base of my custom component. If I 
 don't set set height or width in my component then Flash freezes and says the 
 script is running longer than 15 seconds. Also this same thing happened when 
 I was using mx:Box as the base of my component. This is happening without me 
 overriding any of the measure, commitProperties, etc... functoins. Any 
 suggestions?
 
 Jason
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  Popups are a special case. Panel/TitleWindow know when they've been popped 
  up and resize themselves. You'll have to teach your Box to do the same.
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of flexaustin
  Sent: Thursday, October 08, 2009 2:07 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Custom PopUp not resizing.
 
 
 
  I have a custom popup based on mx:Box. In it I have a dropdown. In this 
  list dropdown you can select multiple items that once items are selected 
  they stay in the dropdowns selected box (think multiselect combobo box). My 
  custom pop has a width and height set to 300 by 300;
 
  Anyway, when I select several items the pop (not the dropdownlist) starts 
  adding scrollbars when there are to many. If I set the 
  horizontalscrollpolicy and verticallscrollpolicy to off then the pop start 
  moving out of what looks like the popups viewablearea/scrollRect?
  So as the selecteditems in my dropdown gets longer the top of the popup 
  start disappearing?
 
  Does the popupmanager need to know to increase its viewable area for the 
  popup? Or is it possible to have a popup increase in size?
 





RE: [flexcoders] Re: Custom PopUp not resizing.

2009-10-09 Thread Alex Harui
Yeah, if you don't get that right then the parent gets width=200 so the child 
gets width=200 then the parent measures at 202 because of a border or something 
so it gets width at 202 so the child gets width=202 and the parent now measures 
at 204...

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 flexaustin
Sent: Friday, October 09, 2009 2:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom PopUp not resizing.



Thanks, Alex. The issue was setting width and height so my override measure was 
never getting called. And I had a couple of component referencing/bound 
{this.width} and {this.height} caused some kind of infinite loop or something?

Set all to minWidth and minHeight all works now.

Jason

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Maybe you're measured size doesn't match the size you're setting, or maybe 
 the setting of the size causes something to be invalidated and go through the 
 whole sizing pass again. Setting breakpoints in LayoutManager can help you 
 find the problem.

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

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
 Behalf Of flexaustin
 Sent: Friday, October 09, 2009 9:04 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Custom PopUp not resizing.



 So I swapped out Box with s:Panel as the base of my custom component. If I 
 don't set set height or width in my component then Flash freezes and says the 
 script is running longer than 15 seconds. Also this same thing happened when 
 I was using mx:Box as the base of my component. This is happening without me 
 overriding any of the measure, commitProperties, etc... functoins. Any 
 suggestions?

 Jason

 --- In 
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
  Alex Harui aharui@ wrote:
 
  Popups are a special case. Panel/TitleWindow know when they've been popped 
  up and resize themselves. You'll have to teach your Box to do the same.
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
   
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
   On Behalf Of flexaustin
  Sent: Thursday, October 08, 2009 2:07 PM
  To: 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Custom PopUp not resizing.
 
 
 
  I have a custom popup based on mx:Box. In it I have a dropdown. In this 
  list dropdown you can select multiple items that once items are selected 
  they stay in the dropdowns selected box (think multiselect combobo box). My 
  custom pop has a width and height set to 300 by 300;
 
  Anyway, when I select several items the pop (not the dropdownlist) starts 
  adding scrollbars when there are to many. If I set the 
  horizontalscrollpolicy and verticallscrollpolicy to off then the pop start 
  moving out of what looks like the popups viewablearea/scrollRect?
  So as the selecteditems in my dropdown gets longer the top of the popup 
  start disappearing?
 
  Does the popupmanager need to know to increase its viewable area for the 
  popup? Or is it possible to have a popup increase in size?
 




[flexcoders] Custom PopUp not resizing.

2009-10-08 Thread flexaustin
I have a custom popup based on mx:Box.  In it I have a dropdown. In this list 
dropdown you can select multiple items that once items are selected they stay 
in the dropdowns selected box (think multiselect combobo box). My custom pop 
has a width and height set to 300 by 300;

Anyway, when I select several items the pop (not the dropdownlist) starts 
adding scrollbars when there are to many.  If I set the horizontalscrollpolicy 
and verticallscrollpolicy to off then the pop start moving out of what looks 
like the popups viewablearea/scrollRect?
So as the selecteditems in my dropdown gets longer the top of the popup start 
disappearing?

Does the popupmanager need to know to increase its viewable area for the popup? 
Or is it possible to have a popup increase in size?





RE: [flexcoders] Custom PopUp not resizing.

2009-10-08 Thread Alex Harui
Popups are a special case.  Panel/TitleWindow know when they've been popped up 
and resize themselves.  You'll have to teach your Box to do the same.

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 flexaustin
Sent: Thursday, October 08, 2009 2:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom PopUp not resizing.



I have a custom popup based on mx:Box. In it I have a dropdown. In this list 
dropdown you can select multiple items that once items are selected they stay 
in the dropdowns selected box (think multiselect combobo box). My custom pop 
has a width and height set to 300 by 300;

Anyway, when I select several items the pop (not the dropdownlist) starts 
adding scrollbars when there are to many. If I set the horizontalscrollpolicy 
and verticallscrollpolicy to off then the pop start moving out of what looks 
like the popups viewablearea/scrollRect?
So as the selecteditems in my dropdown gets longer the top of the popup start 
disappearing?

Does the popupmanager need to know to increase its viewable area for the popup? 
Or is it possible to have a popup increase in size?



Re: [flexcoders] TitleWindow Popup Question(s)

2009-10-06 Thread Angelo Anolin
Hi Dave,

Your advise certainly helped. Thanks.

What I did was the TitleWindow was used to display the data which is retrieved 
from the parent window.

Although I find it odd that the TitleWindow when opened as a popup window does 
not seem to connect to the web service, whereas the parent window does not have 
any problem retrieving the data from the web service.

Thanks again.

Regards

Angelo





From: Dave Cates d...@redemptionmedia.co.uk
To: flexcoders@yahoogroups.com
Sent: Wednesday, 30 September, 2009 1:15:41
Subject: Re: [flexcoders] TitleWindow Popup Question(s)

  
Hi,

I’d reference a public set function within the title window itself. Works good 
for us since we use an MVC model and so don’t really want too much code within 
the TitleWindow view itself.

Regarding the title itself. I do this by assigning a Bindable variable to the 
title in the main header of the title window.

Then I can update the title by simply assigning values to that variable 
whenever I like.

Hope that helps.

Dave.



From: Angelo Anolin angelo_anolin@ yahoo.com
Reply-To: flexcod...@yahoogro ups.com
Date: Tue, 29 Sep 2009 00:55:35 -0700 (PDT)
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] TitleWindow Popup Question(s)

 
 
 

Hi FlexCoders,
 
Just a little TitleWindow popup question.
 
I want a function to be executed everytime my popup title window component is 
displayed.  How do I achieve this?
 
I tried in the title window using the initialize property like:
mx:TitleWindow xmlns:mx=http://www.adobe. com/2006/ mxml 
initialize=RunEveryPop( ); 
 
but my function RunEveryPop only executes the first time the popup is 
displayed. Subsequent popups would not trigger the said function.
 
I know I can declare a public function in the title window and simply call this 
function from the calling main application, but I am wondering if this is a 
good or recommended way in achieving this?
 
Also, another question...
 
How do I reference the title of the TitleWindow from within itself? Like for 
example:
 
private function getTitleWindowTitle () :void
{
 Alert.show(Titlewin dow.Title) ;
 // I Should be able to display the Title of the title window in an alert 
message.
}
 
Advice and inputs would be highly appreciated.
 
Thanks.,

 
  



 
   


  

[flexcoders] Re: TitleWindow Popup Question(s)

2009-10-01 Thread cuttenv
Glad I could help.

Popups are actually children of the system manager not the application. :) So 
make sure you are listening in the right spot.

--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 hi Vito,
 
 Thanks a lot. This surely does work. The reason why my initialize events were 
 not firing is that I declared the popup window in an application scope 
 variable, so basically, it has alread been instantiated and not 
 re-instantiated when I make the call.
 
 Another question though.
 
 I think the TitleWindow when it is a popup window does not seem to be able to 
 make web service calls.  I wonder why. After changing all the codes, I am 
 trying to retrieve a data from a web service from this popup TitleWindow but 
 nothing seems to happen.
 
 Suggestions highly appreciated. Thanks.
 
  
 
 
 
 
 From: cuttenv cutt...@...
 To: flexcoders@yahoogroups.com
 Sent: Tuesday, 29 September, 2009 17:27:01
 Subject: [flexcoders] Re: TitleWindow Popup Question(s)
 
   
 Hey there,
 I'm not sure how you are creating your popup but I would recommend you do it 
 like this.
 var popper:TestPopUp = new TestPopUp();
 PopUpManager. addPopUp( popper,this) ;
 PopUpManager. centerPopUp( popper);
 
 Where TestPopUp is your TitleWindow Component. Then your creationComplete and 
 Initialize events will fire every time because you are creating a new 
 reference.
 
 You can reference the title of the title window inside it's self by calling 
 this.title.
 
 //This code would go inside the TestPopUp.mxml which extends TitleWindow in 
 my example
  private function getTitleWindowTitle () :void
  {
  Alert.show(this. title);
  // I Should be able to display the Title of the title window in an alert 
  message.
  }
 
 Hope that helps,
 -Vito
 
 --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote:
 
  Hi FlexCoders,
  
  Just a little TitleWindow popup question.
  
  I want a function to be executed everytime my popup title window component 
  is displayed.  How do I achieve this?
  
  I tried in the title window using the initialize property like:
  mx:TitleWindow xmlns:mx=http://www.adobe. com/2006/ mxml initialize= 
  RunEveryPop( ); 
  
  but my function RunEveryPop only executes the first time the popup is 
  displayed. Subsequent popups would not trigger the said function.
  
  I know I can declare a public function in the title window and simply call 
  this function from the calling main application, but I am wondering if this 
  is a good or recommended way in achieving this?
  
  Also, another question...
  
  How do I reference the title of the TitleWindow from within itself? Like 
  for example:
  
  private function getTitleWindowTitle () :void
  {
   Alert.show(Titlewin dow.Title) ;
   // I Should be able to display the Title of the title window in an alert 
  message.
  }
  
  Advice and inputs would be highly appreciated.
  
  Thanks.,
 





[flexcoders] menu hides under popup after button click

2009-09-30 Thread umbertooke
Hi

Struggling with the follwing problem:

We build a popup-based application.  Popups are created with default childlist 
parameters, meaning PopUpManagerChildList.PARENT.  In a certain popup, I use 
a standard button that, when clicked open a Menu to offer additional choices.

Problem is that the menu hides *under* the popup, rendering it unusable.  I 
have messed around with Popupmanager.bringToFront(menu), and manipulating the 
z-index of the menu with menu.parent.setChildIndex() etc, but no avail.

The parent of the menu is the SystemManager.

I use flex 3, so no direct z-index available.

Any suggestions ?

Thanks !

P



[flexcoders] TitleWindow Popup Question(s)

2009-09-29 Thread Angelo Anolin
Hi FlexCoders,

Just a little TitleWindow popup question.

I want a function to be executed everytime my popup title window component is 
displayed.  How do I achieve this?

I tried in the title window using the initialize property like:
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; 
initialize=RunEveryPop(); 

but my function RunEveryPop only executes the first time the popup is 
displayed. Subsequent popups would not trigger the said function.

I know I can declare a public function in the title window and simply call this 
function from the calling main application, but I am wondering if this is a 
good or recommended way in achieving this?

Also, another question...

How do I reference the title of the TitleWindow from within itself? Like for 
example:

private function getTitleWindowTitle() :void
{
 Alert.show(Titlewindow.Title);
 // I Should be able to display the Title of the title window in an alert 
message.
}

Advice and inputs would be highly appreciated.

Thanks.,


  

Re: [flexcoders] TitleWindow Popup Question(s)

2009-09-29 Thread Dave Cates
Hi,

I¹d reference a public set function within the title window itself. Works
good for us since we use an MVC model and so don¹t really want too much code
within the TitleWindow view itself.

Regarding the title itself. I do this by assigning a Bindable variable to
the title in the main header of the title window.

Then I can update the title by simply assigning values to that variable
whenever I like.

Hope that helps.

Dave.



From: Angelo Anolin angelo_ano...@yahoo.com
Reply-To: flexcoders@yahoogroups.com
Date: Tue, 29 Sep 2009 00:55:35 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TitleWindow Popup Question(s)

 
 
 

Hi FlexCoders,
 
Just a little TitleWindow popup question.
 
I want a function to be executed everytime my popup title window component
is displayed.  How do I achieve this?
 
I tried in the title window using the initialize property like:
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
initialize=RunEveryPop(); 
 
but my function RunEveryPop only executes the first time the popup is
displayed. Subsequent popups would not trigger the said function.
 
I know I can declare a public function in the title window and simply call
this function from the calling main application, but I am wondering if this
is a good or recommended way in achieving this?
 
Also, another question...
 
How do I reference the title of the TitleWindow from within itself? Like for
example:
 
private function getTitleWindowTitle() :void
{
 Alert.show(Titlewindow.Title);
 // I Should be able to display the Title of the title window in an alert
message.
}
 
Advice and inputs would be highly appreciated.
 
Thanks.,

 
  


 



[flexcoders] Re: TitleWindow Popup Question(s)

2009-09-29 Thread cuttenv
Hey there,
I'm not sure how you are creating your popup but I would recommend you do it 
like this.
var popper:TestPopUp = new TestPopUp();
PopUpManager.addPopUp(popper,this);
PopUpManager.centerPopUp(popper);

Where TestPopUp is your TitleWindow Component. Then your creationComplete and 
Initialize events will fire every time because you are creating a new reference.

You can reference the title of the title window inside it's self by calling 
this.title.

//This code would go inside the TestPopUp.mxml which extends TitleWindow in my 
example
 private function getTitleWindowTitle() :void
 {
  Alert.show(this.title);
  // I Should be able to display the Title of the title window in an alert 
 message.
 }

Hope that helps,
-Vito

--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 Hi FlexCoders,
 
 Just a little TitleWindow popup question.
 
 I want a function to be executed everytime my popup title window component is 
 displayed.  How do I achieve this?
 
 I tried in the title window using the initialize property like:
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; 
 initialize=RunEveryPop(); 
 
 but my function RunEveryPop only executes the first time the popup is 
 displayed. Subsequent popups would not trigger the said function.
 
 I know I can declare a public function in the title window and simply call 
 this function from the calling main application, but I am wondering if this 
 is a good or recommended way in achieving this?
 
 Also, another question...
 
 How do I reference the title of the TitleWindow from within itself? Like for 
 example:
 
 private function getTitleWindowTitle() :void
 {
  Alert.show(Titlewindow.Title);
  // I Should be able to display the Title of the title window in an alert 
 message.
 }
 
 Advice and inputs would be highly appreciated.
 
 Thanks.,





Re: [flexcoders] TitleWindow Popup Question(s)

2009-09-29 Thread Dave Cates
Hi,

I¹d reference a public set function within the title window itself. Works
good for us since we use an MVC model and so don¹t really want too much code
within the TitleWindow view itself.

Regarding the title itself. I do this by assigning a Bindable variable to
the title in the main header of the title window.

Then I can update the title by simply assigning values to that variable
whenever I like.

Hope that helps.

Dave.



From: Angelo Anolin angelo_ano...@yahoo.com
Reply-To: flexcoders@yahoogroups.com
Date: Tue, 29 Sep 2009 00:55:35 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TitleWindow Popup Question(s)

 
 
 

Hi FlexCoders,
 
Just a little TitleWindow popup question.
 
I want a function to be executed everytime my popup title window component
is displayed.  How do I achieve this?
 
I tried in the title window using the initialize property like:
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
initialize=RunEveryPop(); 
 
but my function RunEveryPop only executes the first time the popup is
displayed. Subsequent popups would not trigger the said function.
 
I know I can declare a public function in the title window and simply call
this function from the calling main application, but I am wondering if this
is a good or recommended way in achieving this?
 
Also, another question...
 
How do I reference the title of the TitleWindow from within itself? Like for
example:
 
private function getTitleWindowTitle() :void
{
 Alert.show(Titlewindow.Title);
 // I Should be able to display the Title of the title window in an alert
message.
}
 
Advice and inputs would be highly appreciated.
 
Thanks.,

 
  


 



  1   2   3   4   5   6   7   8   9   10   >