flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric THOMAS <webdoubl...@hotmail.com>
Subject RE: question on modules
Date Tue, 03 Sep 2013 11:22:24 GMT
Usually, Parsley:PopUp can only detect the context of a Class if this one
has been added to a context, generally its module context in case it stands
in a module, when you use fast inject instead of configure, the class is not
added to the context, so Parsley:PopUp should return its closer above
context, am I wrong ?

-Fred

-----Message d'origine-----
De : Maurice Amsellem [mailto:maurice.amsellem@systar.com] 
Envoyé : mardi 3 septembre 2013 12:18
À : users@flex.apache.org
Objet : RE: question on modules

That's what parsley Popup tag is supposed to do for me (call
context.viewManager.addViewRoot and addPopup).  
Anyway, I reverted to the original implementation of parsley Popup, and
popup injections are now working fine, even in modules.

Thanks again for the help.

Maurice
-----Message d'origine-----
De : Frédéric THOMAS [mailto:webdoublefx@hotmail.com] Envoyé : mardi 3
septembre 2013 02:49 À : users@flex.apache.org Objet : RE: question on
modules

Not sure I understood what you want at the end but if you want to open a
popup contains in a module, either you know the popup class and call it via
a static show function and inside the show function, you add "
context.viewManager.addViewRoot(yourPopupInstance);" before calling "
PopUpManager.addPopUp" or you don't know the popup class and you can create
an event/command in the module that call it in the same way I described
before.

-Fred

-----Message d'origine-----
De : Maurice Amsellem [mailto:maurice.amsellem@systar.com]
Envoyé : mardi 3 septembre 2013 02:24
À : users@flex.apache.org
Objet : RE: question on modules

Actually, from SamplePopup.mxml,  parentApplication.sampleModuleLoader.child
points to the module...

So if I KNOW that the component is in module X , this is how to get it.

The problem is that I need a generic mechanism, that would allow me to get
the module instance of any ui component, even if there are several modules,
or even if it belongs to  the top level application.

FYI, the purpose of this is to fix an issue in Cairngorm3/Parsley 2.4 Popup
tag (ie com.adobe.cairngorm.popup.PopupBase class and subclasses), that does
not seem to be module aware.
Actually,  PopupBase.getParent() always returns
FlexGlobal.topLevelApplication even if the Popup tag belongs to a module,
instead of the module instance.
The effect of this is that the context is not computed correctly ( returns
the topLevel application context, instead of the module child context),
Which in turn prevent  FastInject from working inside Popups that are
declared in modules.

Regards,

Maurice 

-----Message d'origine-----
De : Maurice Amsellem [mailto:maurice.amsellem@systar.com]
Envoyé : mardi 3 septembre 2013 01:56
À : users@flex.apache.org
Objet : RE: question on modules

I am new to modules, so not sure to understand what you wrote.

This is how I am using the module:

In main app:
<s:ModuleLoader id="sampleModuleLoader"  url="../SampleModule.swf"/>

The module itself is declared as follows:

SampleModule.mxml
<s:Module>
 ...
</s:Module>

Then I have somewhere else a popup defined in the module SamplePopup.mxml
<s:TitleWindow ...>
   <s:TextInput id="ti" />
</s:TitleWindow>

So what is moduleComponentId in this case ? 

Maurice 

-----Message d'origine-----
De : Mark Kessler [mailto:kesslerconsulting@gmail.com]
Envoyé : mardi 3 septembre 2013 01:21
À : Users@flex
Objet : Re: question on modules

Would something like either of the following have any effect on the your
pathing for test purposes?

(parentApplication.moduleComponentId as
Modulename).ventana.variableName.text = "test";

or

(parentApplication.moduleComponentId as Object).ventana.variableName.text =
"test";


-Mark

On Mon, Sep 2, 2013 at 6:56 PM, Michael Astudillo <
mastudillo@austrosoft.com.ec> wrote:

> Hi,
> When you try to access to a popup trougth a module first you create a 
> variable like TitleWindow and second assign the call at this, for example:
>
> public var ventana:TitleWindow = new TitleWindow(); function Sample() 
> {
>                ventana =
> PopUpManager.createPopUp(this,**titleWindowSample,true)
> as TitleWindow;
>                 PopUpManager.centerPopUp(**ventana);
> }
>
> parentApplication.**moduleComponentId.ventana.**variableName.text = 
> "";
>
>

Mime
View raw message