Returning value from window

Daniel Sananes daniel.s at
Sun Mar 19 23:14:30 UTC 2023


I have this line of code that opens a window for the user to select a client from the list.
Do $windows.vClientSelect.$open('*',kWindowNormal,iClientList).

In the ClientSelect window the receiving parameter pListRef is of type Field reference.
The list is shown in the window with the instance variable iListRef which is of type item reference.
The iListRef variable is set by Set reference iListRef to pListRef.
Lines show up nice in the list and I click in the list on line 2.
Now I think that the iClientList in the calling method should reflect that line 2 is now current.
But it does not. No line is current.

According to docs:
"Once the field reference parameter variable is set up, a reference to the parameter is the same as using the field whose name is passed."
This is not in my case true.

Obviously I am doing something wrong.

Another concern I have is how do you return a value from a window?
I can do:
Quit method VALUE
But this is done after the window is closed so there is no VALUE.
Unless I use global variables, but I don't think that is the way to go. 

0736 704070

More information about the omnisdev-en mailing list