Mostly directed to Rick because he probably has the most insight for this. Recall that in ooDialog the programmer can name a method in the Rexx dialog to be invoked whenever some specific Windows event happens. A classic example is the user clicking a button in the dialog. The programmer can 'connect' that button click to a method in the Rexx dialog, say onClick.
::method onClick -- Rexx code In the original implementation, when the event happened, a method invocation string was constructed and placed in a queue. An ooDialog method periodically checked the queue and if it found a method invocation string used interpret to invoke the method. Since the method periodically checking the queue was started on the same thread as the Rexx dialog was started, the method invocation also ran on the originating thread. With the C++ APIs, I've done away with the whole message queue and invoke the method directly from the Windows message processing loop, which is always a different thread than the originating thread of the Rexx dialog. So 'onClick' is running on a different thread than the originating thread. 1.) In the original ooDialog if there was a syntax condition, or other exception, in the Rexx code in onClick, the condition information would print and the Rexx program would end. Now, the condition information is printed and the dialog / program keeps running. This is because an un-trapped condition ends the currently executing interpreter thread(?) In the original implementation, that thread would have been the main thread, so the program ended. Now, it isn't the main thread, so the program keeps running. Is that an accurate statement? Provided that the above is correct: 2.) This is not necessarily a bad thing, but it is different behavior. Is it sufficiently different to be a problem? 3.) I can't think of any reasonable way to preserve the old behavior. Is there a way to preserve it? This third question actually needs a little more explanation. Right now, I am taking two approaches with the direct invocation of the Rexx methods. * For Window messages that do not need / or ignore a reply I am essentially doing a startWith() * For Window messages that process a reply I am using SendMessage and waiting on the reply from the Rexx code. In this case, I can do a CheckCondition() and could halt the dialog if there was a condition. (Although right now I don't halt the dialog, I just print out the condition info.) It is really the first case above that I don't see a way to preserve the old behavior. -- Mark Miesfeld ------------------------------------------------------------------------------ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel