One window calling another (OpenInsight Specific)
At 13 FEB 1998 04:04:08AM Jose wrote:
We have a window A calling another window B.
Parameters are passed through CreateParam.
Window B has a key with SEQKEY. Window B has a create
Event which fills Window B with the correct data,
which appears in the right fields.
Clicking OK says that the screen is empty.
Should a system routine be called in Window B, for
window B to recognise the fields.
We have tried Send_Event and Forward_Event with no
success.
At 13 FEB 1998 09:06AM Aaron Kaplan wrote:
You would need to read the record before filling in the data fields.
You can do with with a
Status=Send_Event( 'WindowB', PSEVENT_READ$ )
At 13 FEB 1998 11:08AM B Cameron wrote:
This might be what your looking for…
In the "Click" event handler for your "push button" on form A…
Declare function Get_Property, Dialog_Box
key=.FormControlValue_to_pass-]TEXT * key data for form b
Parent=Get_Property(@window, "MDIFRAME")
if len( Parent ) else
Parent=@windowend
if len( key ) then
x=Dialog_Box('form B Name', Parent, key)end else
use msg to send error to user if you wantend
Return 0
Then, here's the important part. In form B in the create event for the window property (i.e dblclick on window]events]create]scripts)
add code…
if CreateParam then
.formbkeycontrol-]TEXT=CreateParamcall Send_Event(@window,"READ")end
RETURN 1
Make sure you return a 1…
Hope this was what you were looking for, good luck.