Hi Jakub,
I'm not entirely sure what you mean by the two alternatives. As I wrote
earlier the Dialog complex is DDL (definition) while the "If" and other
statements are DML (manipulation). The first DML after "Dialog"
terminates the DDL section (i.e. the dialog definition).
When running the dialog, OkButton will terminate the dialog
automatically.
The only reason for having a handler on OkButton, would be to have a
chance to check for dialog entry completeness, issuing a Dialog
Preserve if not.
If CommandInfo(...) ... is often the first DML statement after the
dialog, and it executes _after_ the dialog has terminated and assigned
all Into variables.
Ps! And a pitfall: If you issue a Dialog Remove, e.g. in a ListBox
handler, the dialog terminates, but CommandInfo(CMD_INFO_DLG_OK) is
False.
Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro
kompas skrev: