Rony,

You can not do the equivalent of "reply" from a native method, as
Jean-Louis indicated.  Rick had said that some time ago, but I
couldn't find the message.

Since you say "creating a main loop on a separate thread to dispatch
messages."  You might think about how ooDialog works with the Windows
message loop.

There is a method, startParentDialog, that is implemented as a native
method.  The native method creates a second thread and returns.  In
the second thread, things are set up as a Windows message processing
loop.

Within the args passed to the second thread is a pointer to the
RexxInstance. Within the second thread, the code uses the RexxInstance
to get a RexxThreadContext through AttachTo().  Then this context is
used to invoke methods in the Rexx objects in the Rexx program.  This
works, because the second thread also has a RexxObjectPtr for the Rexx
dialog.

You should / might be able to adapt that model to what you want.  In
ooDialog, the OS handles the dispatching of messages to the message
handling loop.  You would need to write your own way of dispatching
messages to the loop.  Seems pretty doable to me.

--
Mark Miesfeld

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to