Hi Chris

We use SET TIMER(-1) a lot for this purpose. It is ideal when you want to do 
something as part of On Load but you need the On Load execution cycle to finish 
first before you do the next thing, e.g. you need to know the size and position 
of an object on a form before you take some other action.

POST OUTSIDE CALL can also be used for this purpose, particularly if you're 
sending the event from another process. CALL FORM is the the "new way" to do 
this sort of thing but you have to be aware that it does not always run in its 
own execution cycle, i.e. you can't rely on it to perform the sort of On Load 
workflow I just described because the chances are it will run in the same 
exection cycle as the original On Load. Even when the CALL FORM is made from a 
separate process it won't necessarily run in its own execution cycle. That 
said, if I'm not relying on some previous execution cycle to have finished and 
want to "send an event" to the form then CALL FORM is definitely the way to go.

I haven't tried New formula yet so can't comment on that.

cheers
J

> On 24 Apr 2019, at 1:24 am, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Douglas, that is an ingenious way to facilitate it. I suppose one could use a 
> Form object (Form.myEvent) to specify the ‘event’ to perform.
> But it seems that SET TIMER(-1) is what needs to be done [trigger as soon as 
> possible] and then SET TIMER(0) disables the triggering?
> 
> — Chris
> 
>> On Apr 23, 2019, at 9:19 AM, Douglas von Roeder via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Chris:
>> 
>> Set timer (0) and then catch it in On timer.
>> 
>> --
>> Douglas von Roeder
>> 949-336-2902
>> 
>> 
>> On Tue, Apr 23, 2019 at 8:17 AM Chris Belanger via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> I have been using New formula too.
>>> In the context of ORDA-based forms, I have set up  Form.onSave(),
>>> Form.onLoad(), Form.onNew() etc. I like it because the code for record
>>> selection and change can be generic with these ’nubs’.
>>> I wish that one did not have to create a project method [for other than
>>> the most rudimentary use] to use ’New Formula’, but still it is a great new
>>> feature.
>>> 
>>> In any case, back to my question about form events. Is the only mechanism
>>> to do an ‘Outside Call’ with POST OUTSIDE CALL? What have you found that
>>> works, if anything.
>>> 
>>> 
>>>> On Apr 23, 2019, at 9:05 AM, Keisuke Miyako via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>>> 
>>>> I think the future is to use New formula.
>>>> 
>>>> it is like a function pointer in other languages,
>>>> it allows the callee to invoke a callback function at a later time.
>>>> 
>>>> https://blog.4d.com/new-formula-more-power-behind-simplicity/
>>>> 
>>>> alternatively, one could say that CALL FORM is like a custom form event.
>>>> 
>>>> regarding subforms,
>>>> CALL SUBFORM CONTAINER can only convert an event in the subform context
>>>> to another event in the host's context,
>>>> it does not generate a new event.
>>>> 
>>>> 2019/04/23 23:32、Chris Belanger via 4D_Tech <4d_tech@lists.4d.com
>>> <mailto:4d_tech@lists.4d.com>>のメール:
>>>> 
>>>> I remember — but cannot find again — some documentation that talked
>>> about using negative-numbered values for events to facilitate custom
>>> events. However, I seem to remember it only was in the context of subforms.
>>>> 
>>>> 
>>>> 
>>>> **********************************************************************
>>>> 4D Internet Users Group (4D iNUG)
>>>> Archive:  http://lists.4d.com/archives.html
>>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>>> **********************************************************************
>>> 
>>> **********************************************************************
>>> 4D Internet Users Group (4D iNUG)
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **********************************************************************
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **********************************************************************
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to