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