John,
When you dim vParent, just dim it as :
DIM GLOBAL vParent as C
I have a feeling that somewhere along the way, your variable scope is getting confused.
Others may argue, but I don't set a pointer to the different variable spaces. It just confuses me.
Define your variabls as global in both scripts and just use the variable as defined. That should work.
Code:
'Put code here to DIM any variables used in your Xdialog.
'Make a global_variable
dim GLOBAL vParent as c
dim GLOBAL vChilName as c
dim GLOBAL vDate as d
'IMPORTANT: Do not change the dialog title. Place dialog content here...
ui_modeless_dlg_box(dlgTitle,<<%dlg%
{background=<Transparent>}
{startup=init}
{frame=1}
{region}
Date;| [.20vDate!Name_*];
Name Send to child:| [.25vParent!Name_*];
not share any more;
Name get from child:| [%R%.25gv.vChildName];
{endregion};
{lf};
%dlg%,<<%code%
'Place code here for your event handlers...
if left(a_dlg_button,4) = "Name" then
if a_dlg_button ="Name_Change" then
ui_modeless_dlg_refresh(":Share:xdialog1")
ui_modeless_dlg_refresh(":Share:xdialog3")
end if
a_dlg_button = ""
end if
%code%)
Code:
'Put code here to DIM any variables used in your Xdialog.
dim GLOBAL vChildName as C
'Set a Global Variable containing the
dim GLOBAL vParent as C
dim GLOBAL vDate as D
'IMPORTANT: Do not change the dialog title. Place dialog content here...
ui_modeless_dlg_box(dlgTitle,<<%dlg%
{background=<Transparent>}
{wrap=60}
This is an embedded dialog box that responds to the xDialog event sent to it from its parent. and receive from parent;
{lf};
Name for Child:;
[.50vChildName!vName_changed];
Name get From Parent:;
[%R%.50gv.vParent];
Record Date:| [.20gv.vDate];
{lf};
Enter a name into the Name field and, After second, the "Parent" dialog box will be shown the child Name.;
{lf};
%dlg%,<<%code%
'Place code here for your event handlers...
if a_dlg_button ="vName_changed" then
a_dlg_button =""
ui_modeless_dlg_refresh(":share:xdialog3")
ui_modeless_dlg_refresh(":share:xdialog1")
end if
%code%)
The variables are defined in Both scripts as global, so there shouldn't be any confusion.
Tom
Bookmarks