Re: artificially causing a field to be left in a script

2012-09-28 Thread Dr. Hawkins
On Fri, Sep 28, 2012 at 9:34 AM, Bob Sneidar wrote: > What I learned from an old multiuser accounting program was to maintain some > kind of >counter column, incrementing it (or resetting it when it gets to the highest >value) >whenever an update occurs. Before the write, but after you lock the

Re: artificially causing a field to be left in a script

2012-09-28 Thread Bob Sneidar
Depending on your application, locking a record while it's being read has problems. Users will inevitably open a record then go to lunch, maybe leave for the day. Perhaps the app crashes or a lightning strike shuts everything down as soon as they open the record. If you take this approach (or an

Re: artificially causing a field to be left in a script

2012-09-27 Thread Dr. Hawkins
On Thu, Sep 27, 2012 at 10:42 AM, Bob Sneidar wrote: > You would need to put it in a mouseUp handler in any button a user can click > on >while editing. If someone tabs out of the field, and the field has been >altered, >closeField will get sent ok. The issue is clicking a button, and only with

Re: artificially causing a field to be left in a script

2012-09-27 Thread Bob Sneidar
You would need to put it in a mouseUp handler in any button a user can click on while editing. If someone tabs out of the field, and the field has been altered, closeField will get sent ok. The issue is clicking a button, and only with OS X (if memory serves me, which is to say check it yourself

Re: artificially causing a field to be left in a script

2012-09-27 Thread Dr. Hawkins
On Tue, Sep 25, 2012 at 9:59 PM, wrote: > on mouseLeave > focus on nothing > end mouseLeave focus on nothing seems to have possibilities here . . . but not from the mouse, as someone is likely to have reached the field by tab (in fact, probably) If I put the focus on nothing in a script, thou

Re: artificially causing a field to be left in a script

2012-09-26 Thread Bob Sneidar
Craig, that will work for one field. He should put that command in the nav button mouseUp scripts, or in a frontscript mouseUp handler, making sure he passes mouseUp. Bob On Sep 25, 2012, at 9:59 PM, dunb...@aol.com wrote: > Now I see. > > > put this into the field script: > > > on mouse

Re: artificially causing a field to be left in a script

2012-09-26 Thread Bob Sneidar
Do you mean click on a button? This works for me if I click on another field or on the card background. It works the way you are seeing it only if I click on a button. We just had a thread about this. Put focus on nothing in the mouseUp handler of your button. This will have the effect of sendin

Re: artificially causing a field to be left in a script

2012-09-25 Thread Terry Judd
the mouseUp handler of the button, or set the traversalOn of the button to true. Terry... > > > Craig Newman > > > > -Original Message- > From: Dr. Hawkins > To: How to use LiveCode > Sent: Wed, Sep 26, 2012 12:39 am > Subject: Re: artificially causing

Re: artificially causing a field to be left in a script

2012-09-25 Thread Peter Haworth
If you're saying the user clicks on a button after changing a field, see the other concurrent thread going on right now. closeField doesn't happen if you change a field's contents and then immediately click on a button. The other thread has the workaround. Pete lcSQL Software

Re: artificially causing a field to be left in a script

2012-09-25 Thread dunbarx
am Subject: Re: artificially causing a field to be left in a script On Tue, Sep 25, 2012 at 8:43 PM, wrote: > Sorry, still not getting it. If I change the contents of a field, it matters not what I do next: >click a button or the card, navigate to another card via any means open to me, f

Re: artificially causing a field to be left in a script

2012-09-25 Thread Dr. Hawkins
On Tue, Sep 25, 2012 at 8:43 PM, wrote: > Sorry, still not getting it. If I change the contents of a field, it matters > not what I do next: >click a button or the card, navigate to another card via any means open to me, >focus on >another field, whatever, the "closeField" message is sent. Tha

Re: artificially causing a field to be left in a script

2012-09-25 Thread dunbarx
he text of the field is changed? Craig -Original Message- From: Dr. Hawkins To: How to use LiveCode Sent: Tue, Sep 25, 2012 11:35 pm Subject: Re: artificially causing a field to be left in a script On Tue, Sep 25, 2012 at 8:20 PM, wrote: > > When you say "clicks to go to

Re: artificially causing a field to be left in a script

2012-09-25 Thread Dr. Hawkins
On Tue, Sep 25, 2012 at 8:32 PM, wrote: > Is this not what you needed? Not quite-- when the nav button is hit, that script runs before the card is left. For that matter, the card is never left; I just load new data into the fields from the database. It looks to the user like a stack of cars.

Re: artificially causing a field to be left in a script

2012-09-25 Thread Dr. Hawkins
On Tue, Sep 25, 2012 at 8:20 PM, wrote: > > When you say "clicks to go to the next data", what do you mean? There are nav buttons. Each datum contains a couple of dozen fields. If any change (flag set on exitfield), the datum is dumped to the database. > I thought your issue was leaving a fie

Re: artificially causing a field to be left in a script

2012-09-25 Thread dunbarx
in the msg box, followed by the field descriptor. Is this not what you needed? Craig -Original Message- From: Dr. Hawkins To: How to use LiveCode Sent: Tue, Sep 25, 2012 11:16 pm Subject: Re: artificially causing a field to be left in a script On Tue, Sep 25, 2012 at 8:13 PM,

Re: artificially causing a field to be left in a script

2012-09-25 Thread dunbarx
; is sent only when the field contents have changed. Craig Newman -Original Message- From: Dr. Hawkins To: How to use LiveCode Sent: Tue, Sep 25, 2012 9:47 pm Subject: artificially causing a field to be left in a script TO avoid pounding the database, my card full of data fields only

Re: artificially causing a field to be left in a script

2012-09-25 Thread Dr. Hawkins
On Tue, Sep 25, 2012 at 8:13 PM, wrote: > Can't you use "exitField"? No; that only applies if the field is exited without change--and I only care about the case where the field has changed, but the card is left before leaving the field. When that happens, I want the closefield behavior for that

Re: artificially causing a field to be left in a script

2012-09-25 Thread dunbarx
Hi. Can't you use "exitField"? Craig Newman -Original Message- From: Dr. Hawkins To: How to use LiveCode Sent: Tue, Sep 25, 2012 9:47 pm Subject: artificially causing a field to be left in a script TO avoid pounding the database, my card full of data fields onl

artificially causing a field to be left in a script

2012-09-25 Thread Dr. Hawkins
TO avoid pounding the database, my card full of data fields only saves data if any has changed. This is done by closeField setting a flag. However, if someone changes data in one field, but then clicks to go on to the next data, closefield is never reached. If I can send a tab to the field with