Re: Record Flush in handler doesn't work

Florian Groothuis

What I usually do is the following:


Event ButtonClick sets a Virtual to True and performs a RecordFlush

Event DoStuff sets that same virtual to False and is triggered by that virtual in the RecordPrefix




Van: [] Namens Boguslaw Uryga
Verzonden: maandag 30 januari 2017 16:06
Onderwerp: Re: [magicu-l] Record Flush in handler doesn't work


Thanks Sherm,

We used that workaround for years but it is little annoying to write doubled handlers over and over again. Besides it clutters the task view and logic. 

Getting things done (and simple I would add) !




2017-01-30 15:29 GMT+01:00 sherman levine <slevine@...>:

I think the underlying issue is that the internal events are added to the processing buffer, while the call program is executed immediately.

One approach is to have the button trigger two buffered events

    Record flush (wait=no)

    User action ## (wait=no)

and have the user action handler call program B.

That will force the record flush to complete before the user action is triggered.



On 01/30/2017 09:13 AM, Boguslaw Uryga wrote:

I had an idea to simply write a record to disk before zooming to another program, to ensure that the called program sees all changes made in calling one.

I tested this in the following simple setup:

   - browse, allow modify, with zoom [Button]  on the form
   - handler on Event=Zoom, Ctrl=[Buttom], with two lines: Raise Event 'Record Flush'action and Call Program: ProgramB (Param=RecordID)

ProgramB (Param=RecordID)
   - screen to show the record with the passed ID

I tried different settings of Wait, Flow, Propagate options, 'Screen Refresh'act, 'View Refresh'act and even IF( stat(0,'q'mode), 'Query Records'act, 'Modify Records'act ) but it refuses to work.

Do you have any idea why doesn't it work or know any simple way to do it?   




Met vriendelijke groet - With kind regards,

Florian Groothuis
+31 (0)6 21927914

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer

Join to automatically receive all group messages.