Hi Eric,

> Thank you for the reply.
thank you for giving a reply back. 

>  I did not quite understand the purpose of the asterisk at first.
> Then I watched a bit of the presentation by Thomas Maul that you referenced.
> It seems that this asterisk parameter is an early stage to the upcoming 
> messaging commands.
I beg to differ, see the manual on Dialog of version 13 then try the example 2 
code.  (topic: Data Entry;  subtopic: Dialog)
create 2 project windows: "Doc" and "tools" the play around. The first Call of 
Dialog with * will relinquis control back to the calling method and does not 
'stop' 
so now the second Dialog call has the 'main' flow of code. 

> Due to the manner in which my code was written, with an inherent expectation 
> that once the dialog is closed and not before, execution will return to the 
> line of code directly after the DIALOG command, I was getting -9909 errors 
> when using it.
in the manual I find this reason for the code:
Note: You must create a window before calling the statement DIALOG(form;*); it 
is not possible to use the current dialog window in the process nor the window 
created by default for each process. Otherwise, the error -9909 is generated.

So apparently you must have a  "open form window" or "open window", right 
before each call use for the command Dialog.
Anyway you must look in your code what is happening. you CANNOT have something 
like this: 

$tools_window:=Open form window("tools";Palette form window)
DIALOG("tools")

// some code then again:

DIALOG("doc")


> I was getting the error since I did not realize that the first call that I 
> made with the DIALOG command was returning control immediately (as if the 
> user hit the cancel button), and then the code was ready to load the next 
> dialog form which isn't permitted without a new window, apparently.e
correct

> Assuming that I am correct in my analysis, once the dialog window is canceled 
> or accepted, where does control return in the process?  
I don't know any better than the flow continues right after you have Dialog 
command, normally it will have a 'close window($windowRef) after the Dialog 
command, where the execution flow continues. 

> Furthermore, if no code is written after the DIALOG command, the process 
> would likely end leaving only the open dialog.  
yes, that is the reason you almost always have a "close window($windowRef) 
after a Dialog command
like so: 
c_longint($windowRef)

$windowRef:=Open window(10;40;370;220;5)              // Open a movable dialog 
window type 5
 DIALOG("Search Dialog")                 //  Display a custom search dialog
 CLOSE WINDOW($windowRef)                       // No longer need the modal 
window

// next line of code 
if there is no more code the process stops. 

Playing with the example 2
you'll see that if you close the 'first dialog with asterix' that nothing 
happens with the second dialog, the second Dialog is still in control / still 
has the execution flow under control
However if you close the dialog (without the *) both windows are closed and 
execution stops. 
> It is still somewhat confusing.  I suppose that is the intent so that once 
> that dialog is closed, the process goes away.
play around with the example 2 and find out. 

> Is this a correct assumption?
that last assumption sounds correct if it's the last dialog command like in the 
example 2

> Thank you,
you are welcome. 
greetings

attached some very very basic code of example 2, create datafile when asked.    
2 windows Doc and tools, open testing in method editor and run method by 
clicking the green triangle.
click button grid on dialog  then press tab key. 


Ernie Hilgers (Aruba)

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to