Hi Lahav, Ref: "You are actually calling a method that runs in the context of the form window. You don't need to trap for an event, the method just runs and does whatever it needs to do in the context of the form.”
I think I get it. Ref: "One question for you, any reason to use arrays rather than a collection?” Not for or against. I think it’s that arrays seem easier in this case. But maybe not. Habit I suppose. Appreciate, John… > You are actually calling a method that runs in the context of the form > window. You don't need to trap for an event, the method just runs and does > whatever it needs to do in the context of the form. > > For example, if you only need to add a row to an array on the form, write a > method "InsertElement": > > C_Text($1) > > APPEND TO ARRAY(myFormArray;$1) > > Then in the process that do all your data crunching, just call: > > Call Form($YourcallingFormWindowID;" InsertElement ";"Add This") > > You are done.... > > One question for you, any reason to use arrays rather than a collection? > > Lahav > > >> On Mar 9, 2020, at 10:22 AM, John J Foster <[email protected]> wrote: >> >> Hi Lahav, >> >> Good to hear from you my man! >> >> Ref: "An easier way to think of CALL FORM is to look at it as the old ON >> OUTSIDE CALL event in a form, but with the added bonus of being able pass >> data to the form as parameters from the calling process, without using >> global variables." >> >> I kind of get that but can’t see where the form captures as event (we don't >> have On Call Form) so I know where to append to the listbox with the new >> rows/data as it’s being returned. >> >> Does that make sense? That’s where my confusion lies. >> >> John… >> >> >> >>> On Mar 9, 2020, at 9:42 AM, John J Foster <[email protected]> wrote: >>> >>> Hi Peter, >>> >>> Yea, that’s what I thought! >>> >>> So trying to understand (aka, visualize in my minds eye before I code) how >>> to correctly get back the rows being returned from another process. I am >>> thinking of some sort of object. >>> >>> I’m still trying to follow Olivier’s explanation “try to see CALL FORM as >>> "execute this project method in the context of this form", similar to >>> EXECUTE METHOD IN SUBFORM”. >>> >>> Anyway, reviewing your previous thoughts. >>> >>> Appreciate, >>> John… >>> >>> >>>> On Mar 9, 2020, at 9:24 AM, Peter Bozek <[email protected]> wrote: >>>> >>>> In fact, worker cannot share variables with another process (think of >>>> worker as another process running on another processor, not sharing the >>>> memory with main process.) But worker can call a method with CALL FORM and >>>> pass a parameters to that call, and the parameter can be, for example, an >>>> object with embedded values. >>> >> > ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

