Hi Cristophe,

It's not only possible, it's how MIPro works :-)

Every mbx is a sandbox, with it's own set of event handler routines. These
routines are fired by MIPro in sequence when required, thus they don't
interfere with each other (unless programmed to do so). The order of the
execution requence is undefined/random/not known, but it's probably either
the order in which the mbx's are loaded, or the reverse order. But don't
count on either being the case.

The problem is that all mbx's work in a shared environment. All tables and
windows are common to all mbx's, so you can easily program an event handler
routine in one mbx that crashes a similar routine in another mbx. That's one
of the reasons why well-behaving event handler routines shouldn't perform
any GUI tasks. MIPro certainly doesn't perform any error checking when
executing event handler routines, it's quite easy to crash MIPro this way
:-(

So the short answer is: each mbx has it's own independent event handler
routine, that works independently of each order. You probably can't enforce
the sequence in which they're fired.

What you can do, if you want to ensure that the "slave" to fire after the
"master", is only having the master run the real event handler, and have
this trigger a routine in the slave via the RemoteMsgHandler interface.

PS! Are you contemplating building a MapStarWarsEpisode3 app with seperate
modules SithLord.mbx and DarthVader.mbx :-)

Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard & Meklenborg
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvm.dk
----- Original Message ----- 
From: "Christophe Brabant" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 19, 2005 9:09 AM
Subject: MI-L 2 differents WinChangedHandler handlers at the same time ?


Hi everyone

Another question...

My main Mapbasic application uses a standard Mapinfo handler, like
WinChangedHandler.

If I run another MBX application from this main application, is it possible
to use another WinChangedHandler handler for this "slave" application
without conflict ?

Of course, sources of both applications are compiled and linked separatly.

Christophe


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16529

Reply via email to