On Sun, Jan 13, 2013 at 9:14 AM, Staffan Tylen <staffan.tylen@gmail.com> wrote:

Isn't this the situation where you must turn autoDetection off

::method initAutoDetection
self~noAutoDetection


I have some code where setText is working and that doesn't deal with autoDetection, the only difference I can see is that setText is invoked after initDialog has terminated.

Well, that is a huge difference.  ;-)  setText *always* works.  It works when you use it in initDialog().  It is just that after you have set it, the ooDialog framework sets it back to "".

Here is the internal flow in the framework when you invoke the execute method:

execute()
    framework configures some basic stuff
    framework gets the OS to create the underlying dialog
    framework does some other work needed to get the dialog running
    framework invokes initDialog() in your Rexx dialog
        initDialog() executes and you do whatever
        initDialog() ends ...
    control returns to the framework
    framework checks some other stuff
    framework sets all the controls to values unless auto detection is off
    framework returns control to execute()
execute() regains control and runs until the underlying dialog is closed

So, in your dialog where ever you invoked setText() it was *after* control returned to execute().

Meaning it was after the framework sets all the controls to values.

If you set the controls in initDialog(), or any other method invoked from initDialog(), the framework will change the values of many of those controls after you return from initDialog().

--
Mark Miesfeld