Returning value from window

Scotte Meredith spomacguy at
Mon Mar 20 18:03:34 UTC 2023

I don't know why that is not working. What you are expecting is what it should be doing.

Scotte Meredith
spomacguy at

> On Mar 20, 2023, at 4:04 AM, Daniel Sananes <daniel.s at> wrote:
> Thanks Scotte
> Clicking on a line in the presented list that is an item reference to the parameterlist pRef does not reflect back to the original list.
> It works if I assign the line to the Field reference just before the select window is closed.
> Set reference iList to pListRef.
> Enter data.
> Do pListRef.$line.$assign(iLine) ## With this line it works. Without the pListRef stays as it were.
> Do $cwind.$close().
> Quit method.
> ---
> Passing things back and forth.
> Yes, what you say is how I do it in Omnis7.
> Thought there could be other ways in Studio.
> ---
> Regards
> Daniel
> -----Ursprungligt meddelande-----
> Från: omnisdev-en <omnisdev-en-bounces at> För Scotte Meredith
> Skickat: den 20 mars 2023 00:51
> Till: OmnisDev List - English <omnisdev-en at>
> Ämne: Re: Returning value from window
> Yes, that is how you set it up. Any change to the line should be reflected in the original variable. Look at the variable itself rather than how it displays on the original window. Perhaps a redraw it needed on the first window.
> As for how to pass other things back and forth, you can pass a reference of the original window to the new window and the name of the method you want to be called. Then you know the name to call back to pass no back.
> Do $windows.vClientSelect.$open(‘*’,kWindowNormal,iClientList,$cinst.$ref,’$passbackDataMethod’)
> In new window:
> Set reference iirOrigWindow to pfrPassedInRef Calculate icCallbackMethod as pcMethodName
> Later in some other method:
> Do iirOrigWindow.[icCallbackMethod](parameter1,parameter2)
> Sent from my iPad
>> On Mar 19, 2023, at 4:15 PM, Daniel Sananes <daniel.s at> wrote:
>> Hi
>> 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.
>> /Daniel
>> 0736 704070
>> _____________________________________________________________
>> Manage your list subscriptions at Start a 
>> new message -> mailto:omnisdev-en at
> _____________________________________________________________
> Manage your list subscriptions at Start a new message -> mailto:omnisdev-en at
> VARNING: Det här e-postmeddelandet kommer från en extern avsändare. KLICKA INTE på länkar eller bilagor om du inte känner igen avsändaren och vet att innehållet är säkert.
> _____________________________________________________________
> Manage your list subscriptions at
> Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list