Window Opening Information

In VLF-WIN, when a window is opened or activated by the avShowWindow method, information can be passed to it in the parameters OpenInfo1 -> OpenInfo5 and OpenObjectRef.


These parameters optionally allow 5 strings of up to 256 characters and an object reference to be used exchange information between windows.


For example, if a filter or command handler opened a window named DEMO_WINDOW and passed 5 strings to it like this:


#AvFrameworkManager.avShowWindow Caller(#Com_Owner) For(BUSINESSOBJECT) ofType(EMPLOYEES) WindowName(DEMO_WINDOW) OpenInfo1('Test String 1') OpenInfo2('Test String 2')  OpenInfo3('Test String 3')  OpenInfo4('Test String 4')  OpenInfo5('Test String 5')   


Then if a filter or command handler executing inside DEMO_WINDOW executed this code:


Use Message_box_Add ('In window named'#Com_Owner.avCurrentWindow.WindowName)

Use Message_box_Add ('OpenInfo1 ='#Com_Owner.avCurrentWindow.OpenInfo<1>)

Use Message_box_Add ('OpenInfo2 ='#Com_Owner.avCurrentWindow.OpenInfo<2>)

Use Message_box_Add ('OpenInfo3 ='#Com_Owner.avCurrentWindow.OpenInfo<3>)

Use Message_box_Add ('OpenInfo4 ='#Com_Owner.avCurrentWindow.OpenInfo<4>)

Use Message_box_Add ('OpenInfo5 ='#Com_Owner.avCurrentWindow.OpenInfo<5>)

Use message_box_show


The result would look like this:



You can get access to the opening information associated with any window by getting a class #VF_SY154 reference to the window (see preceding sections Finding a Window and Enumerating All Windows).


You can update the opening information currently associated with any window by setting the OpenInfo<> properties like this example, which updates the MAIN window:


#Com_Owner.avMainWindow.OpenInfo<1> := "Return String 1"

#Com_Owner.avMainWindow.OpenInfo<2> := "Return String 2"

#Com_Owner.avMainWindow.OpenInfo<3> := "Return String 3"

#Com_Owner.avMainWindow.OpenInfo<4> := "Return String 4"

#Com_Owner.avMainWindow.OpenInfo<5> := "Return String 5"


The OpenObjectRef property may be used to pass any type of object reference between windows. By doing this you can pass and share any amount or type of information between windows.  

To get a filter or command handler in the new window to use the OpenInfo data, add an uShowWindowCompleted method routine to the command handler/filter. See Notifying other Windows of Significant Events.