Just to add a little more to this. I suspect a number of readers already
realized a really simple solution to this specific case is to simply test
the read/write state in the On timer form event and NOT update if it's read
write.
This turns out to be a better solution in my case because it's a single
place to test it vs. multiple points in the code otherwise. Easier to read
and understand.
However, it's also totally effective to just change toggle the Set timer
event on and off as Arnaud suggested, and in a different case could be
better.
Once more this turned out to be more of a question of how to look at the
problem.
On Fri, Feb 8, 2019 at 8:48 AM Kirk Brooks wrote:
> Hi List,
> I have never used Set timer very much so I've got a noobie question. I'm
> adding some real-time updating code to financial forms: think Invoices,
> Billing Account summaries. that sort of thing. An invoice is the most
> obvious - User A has a form open that displays the invoice details (total
> amount, balance due). I want to update the balance due when a new payment
> is applied which could be from anywhere in the system. I have the code for
> all that worked out the issue is managing displaying the balance due part.
>
> Set timer is one solution. Every couple of seconds the form can simply
> reload the invoice details. The issue is the interruption to the user if
> they are doing something else on the form. Like entering data in a field or
> variable. Is there a way to trap use actions like that so I can block the
> On timer code from running?
>
> --
> Kirk Brooks
> San Francisco, CA
> ===
>
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
>
> *Wittgenstein and the Computer *
>
>
--
Kirk Brooks
San Francisco, CA
===
What can be said, can be said clearly,
and what you can’t say, you should shut up about
*Wittgenstein and the Computer *
**
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
**