Multiple instances of Jeash?

Asked by Sam McFadden

Hello,

I am looking to use haXe NME and Jeash to create a modular loading suite of interactions/applications. I am trying to figure out how to do this given the single namespace of haxe generated JS and the dangers of overwriting properties between applications. Do you have any advice on how I might best achieve something like this please? I am looking for a shell with menu system that will load in and out different interactions/applications. I don't want to load everything all at once due to the sheer size of the whole suite.

Thanks so much,

Sam

Question information

Language:
English Edit question
Status:
Answered
For:
jeash Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Niel Drummond (niel-drummond) said :
#1

The compiler at version 2.08 had the --js-namespace option, which prepended
the given string to all classes, but not the special/global variables like
$closure and others that are emitted before the typing stage of the
compiler. Currently on trunk and for the next release, the compiler will
inline the whole script in a function closure and use proper variable
assignment to make sure nothing gets clobbered in the global scope, as good
practice should do.

For splitting up your files, there currently isn't anything available
unless you want to go back to haxe version 2.07, where the jstm project [1]
has implemented a module splitter. The author hasn't updated the code to
2.08 onwards, but among the features offered is a macro based js custom
compiler that will split files into modules. If you go down this route, you
will most probably be editing macros to get it to run in a desirable way.

As a side note, if you're good at haxe, it's not a huge deal to implement
yourself, take a look at [2], and the --macro switch.

[1] http://code.google.com/p/jstm/
[2] http://haxe.org/manual/macros_compiler

- Niel

On Thu, Mar 15, 2012 at 3:10 PM, Sam McFadden <
<email address hidden>> wrote:

> New question #190773 on jeash:
> https://answers.launchpad.net/jeash/+question/190773
>
> Hello,
>
> I am looking to use haXe NME and Jeash to create a modular loading suite
> of interactions/applications. I am trying to figure out how to do this
> given the single namespace of haxe generated JS and the dangers of
> overwriting properties between applications. Do you have any advice on how
> I might best achieve something like this please? I am looking for a shell
> with menu system that will load in and out different
> interactions/applications. I don't want to load everything all at once due
> to the sheer size of the whole suite.
>
> Thanks so much,
>
> Sam
>
> --
> You received this question notification because you are an answer
> contact for jeash.
>

Revision history for this message
Sam McFadden (sam-mcfadden) said :
#2

Thanks again Niel for imparting all this useful info. Much appreciated!!!

Sam

Can you help with this problem?

Provide an answer of your own, or ask Sam McFadden for more information if necessary.

To post a message you must log in.