OODialog has the data auto detection feature:
"Automatic data field detection means that for every dialog data item a corresponding Object Rexx
attribute is created automatically."
In the ResDialog class there is an off by 1 error that causes the first dialog data item to be missed. You can see this using either of the 2 ResDialog samples.
oopet.rex:
There are these controls listed in the .rc file:
CONTROL "animal1", 1001, "EDIT",
CONTROL "animal2", 1002, "EDIT",
CONTROL "animal3", 1003, "EDIT",
CONTROL "animal4", 1004, "EDIT",
CONTROL "animal5", 1005, "EDIT",
CONTROL "animal6", 1006, "EDIT",
CONTROL "animal7", 1007, "EDIT",
CONTROL "animal8", 1008, "EDIT",
In oopet.rex, right have the line:
d~execute("SHOWTOP")
insert this code:
d~execute("SHOWTOP")
do i = 1 to 8
say ".peddialog instance has attribute animal"i "?" d~hasmethod( "animal"i)
end
And you get this output:
.peddialog instance has attribute animal1 ? 0
.peddialog instance has attribute animal2 ? 1
.peddialog instance has attribute animal3 ? 1
.peddialog instance has attribute animal4 ? 1
.peddialog instance has attribute animal5 ? 1
.peddialog instance has attribute animal6 ? 1
.peddialog instance has attribute animal7 ? 1
.peddialog instance has attribute animal8 ? 1
oowalk2.rex:
From walker.rc:
EDITTEXT 101,
EDITTEXT 102,
EDITTEXT 103,
AUTOCHECKBOX "&Smooth corner wrap", 104,
In oowalk2.rex, right after the line:
dlg~Execute("SHOWTOP")
insert this code:
dlg~Execute("SHOWTOP")
say ".walkerdlg instance has attribute DATA101" dlg~hasmethod( "DATA101" )
say ".walkerdlg instance has attribute DATA102" dlg~hasmethod( "DATA102" )
say ".walkerdlg instance has attribute DATA103" dlg~hasmethod( "DATA103" )
say ".walkerdlg instance has attribute SMOOTHCORNERWRAP" dlg~hasmethod( "SMOOTHCORNERWRAP" )
and you get this output:
.walkerdlg instance has attribute DATA101 0
.walkerdlg instance has attribute DATA102 1
.walkerdlg instance has attribute DATA103 1
.walkerdlg instance has attribute SMOOTHCORNERWRAP 1
Anonymous
Logged In: YES
user_id=191588
Originator: YES
This is fixed in SVN with revision 386