Ahh i see. The application I'm porting had a hub application where they
loaded at runtime .swf applications on user demand. They have about 150 of
these "views". ModuleLoader isn't fully baked out and I still have to
instantiate via window["module"["path"] which is a workaround. It might be
the solution to have a monolith application, although my boss seems against
this idea. Can jewel components and mx components work together? Is a jewel
module completely different from an mx:Module?

On Thu, Dec 2, 2021 at 2:17 PM Harbs <[email protected]> wrote:

> There’s an <html:Iframe> component. You should use that. It sounds like
> you are trying to add an actual html element directly in MXML. That’s not
> going to work very well.
>
> > Not sure what you mean by cross-op, but would need the apps to share many
> > models or singletons.
>
> Sharing models and singletons is not going to work in an iframe. You can
> only share data by sending messages that can be sent as strings.
>
> If you need to share models and singletons, you’ll need modules. Have you
> looked at the ModuleExample app in the example folder?
>
> That said: Why do you need modules at all? In Flash I used modules to
> reduce the size of my main application. In Royale I have not found it to be
> an issue.
>
> Harbs
>
> > On Dec 2, 2021, at 8:57 PM, GAbe Barbosa <[email protected]> wrote:
> >
> > Thanks for responding Harbs!
> >
> > Could you give me an example of this please. The only way I've been able
> to
> > load the other mx:Application is modifying the index.html and adding an
> > <iframe src='indexOfAnotherApplication.html' > then instantiating the
> > object via:
> >    var obj :Object = window.frames["0"]["application"]["path"];
> >    obj = new obj();
> >
> > but then fails on adding to the screen via:
> >    addChild(obj as IUIComponent)
> >
> > Not sure what you mean by cross-op, but would need the apps to share many
> > models or singletons.
> >
> > On Thu, Nov 25, 2021 at 2:48 AM Harbs <[email protected]> wrote:
> >
> >> How much cross-op do you need?
> >>
> >> I’d probably load it in an iframe you can use either <html:Iframe> or
> >> <js:WebBrowser>
> >>
> >> If you need limited communication, you can use postMessage to
> communicate
> >> between the two apps.
> >>
> >> https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
> >>
> >>> On Nov 25, 2021, at 1:29 AM, GAbe Barbosa <[email protected]>
> wrote:
> >>>
> >>> Hi royale folks,
> >>>
> >>> I've tried using mx:Modules with no success. I'm trying to come up with
> >> an
> >>> alternative solution and need help.
> >>>
> >>> How would you launch/load an application from the currently running
> >>> application at runtime. Ensuring I don't get any duplicate deps is a
> >> whole
> >>> other problem, so don't worry about that for now.
> >>>
> >>> Will be grateful for any ideas, suggestions. Thank you!
> >>
> >>
>
>

Reply via email to