Loading a module from a module

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading a module from a module

Olaf Krueger
Hi,
I'm trying to load a module from a module which itself is already loaded by
a shell app.
But that does not work for me.
What I found is that the module can only be loaded by the "parent" module if
the shell also loads it.

I am not so familiar with modules, so before diving deeper into this stuff
I'd like to know if the described scenario basically should work.

Or do I have to change my thinking? Maybe what I am trying to achieve
doesn't make sense?

Thanks,
Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Alex Harui-2
Modules loading modules works in general.  You may need to learn about child ApplicationDomains.  What kinds of problems are you running into?

-Alex

´╗┐On 8/9/18, 11:51 AM, "Olaf Krueger" <[hidden email]> wrote:

    Hi,
    I'm trying to load a module from a module which itself is already loaded by
    a shell app.
    But that does not work for me.
    What I found is that the module can only be loaded by the "parent" module if
    the shell also loads it.
   
    I am not so familiar with modules, so before diving deeper into this stuff
    I'd like to know if the described scenario basically should work.
   
    Or do I have to change my thinking? Maybe what I am trying to achieve
    doesn't make sense?
   
    Thanks,
    Olaf
   
   
   
    --
    Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7C28bfd1338dcf4ef8188e08d5fe291150%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636694374700988686&amp;sdata=BqWaPMYXh40TqIxlJuDG8uvEougjtwnh%2BWQBB3ekETs%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Carlos Rovira-2
In reply to this post by Olaf Krueger
Hi Olaf,

I don't have the module used fresh in my mind, but I can tell you that
should work. If you don't get it working you can communicate with the
parent module so that module perform the load.
Sorry, to not be of much help at this time, but at least I can tell you
that what you want to do should work.

Good luck! :)

Carlos



2018-08-09 20:51 GMT+02:00 Olaf Krueger <[hidden email]>:

> Hi,
> I'm trying to load a module from a module which itself is already loaded by
> a shell app.
> But that does not work for me.
> What I found is that the module can only be loaded by the "parent" module
> if
> the shell also loads it.
>
> I am not so familiar with modules, so before diving deeper into this stuff
> I'd like to know if the described scenario basically should work.
>
> Or do I have to change my thinking? Maybe what I am trying to achieve
> doesn't make sense?
>
> Thanks,
> Olaf
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>



--
Carlos Rovira
http://about.me/carlosrovira
Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Olaf Krueger
Hi Carlos,

>you can communicate with the parent module so that module perform the load.

Yes, this is something I also thought about, but I hope this is not needed
;-)

Thanks!
Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Olaf Krueger
In reply to this post by Alex Harui-2
>What kinds of problems are you running into?

The module which fails seems to be loaded successfully (throws ready event)
but it throws an error like  
"Could not create module 'MyModule'".

>You may need to learn about child ApplicationDomains
I'll take a look at this!

However, good to know that ist basically should work!

Thanks!
Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Olaf Krueger
In reply to this post by Olaf Krueger
Hi,
I found that I accidentally used the same namespace for (not shared) actors
of both modules.
E.g. both modules implement its own IViewApplication interface but I guess
because of the same namespace and same interface name [1] this results in a
conflict.
So I just added the module name to the namespace and it works :-)

Thanks for the help!
Olaf

[1]
implements="com.mydomain.core.as3.interfaces.IViewApplication"

[2]
implements="com.mydomain.module1.core.as3.interfaces.IViewApplication"
implements="com.mydomain.module2.core.as3.interfaces.IViewApplication"



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Loading a module from a module

Olaf Krueger
Hi Alex,

Forgot:
I will still read a bit more about the ApplicationDomains, there are
probably other ways to avoid such conflicts...

Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/