Page 1 of 1

PostPosted: Tue Feb 21, 2006 5:21 pm
by kda406
Hi, in one app, when the user changes a notes field, I use the onchange handler to set a bit, indicating that the data needs to be saved. I kept thinking there was a problem with my save routine, but it turns out that the bit is not getting set sometimes because onchange isn't always getting called when it should be. I further traced this to a problem in OrbForms.

<b>If the user clicks on the field to change it, then clicks on the "ABC" icon in the PDA's graffiti area, types in the new data, and clicks the Done button, the new data is placed in the field. But onchange is not called for that field.</b>

In my app, this means the bit doesn't get set and the data doesn't get saved if they user enters the text using the keyboard. Can anybody suggest any work-arounds until this bug is fixed?


PostPosted: Tue Feb 21, 2006 10:26 pm
by nmc
In your onclose-handler, call your save-function if "field.dirty" is true.

PostPosted: Wed Feb 22, 2006 12:07 pm
by kda406
Thanks for the reply, sir, but that <i>will not work</i>.

When I say "save" the data, it was an oversimplification so the post wouldn't get too wordy. Here's a little more detail.

When any data on the form is changed, a bit is set and an icon pops up to indicate the data needs to be "saved". The user clicks on that icon to save the data. If the user uses the keyboard to enter data into the field the icon will not pop up and therefore they cannot save the data. This is a problem.

Likewise, if they change the field using the keyboard, then they change something else on the form and the save icon <i>does</i> pop up, the save routine cannot save the field, because the onchange handler was not called when the keyboard was used, and the data was not loaded into the buffer that the save routine uses.

What I mean by "save": When the user changes any data on the many many forms, a bit is set, the save icon comes up, and each change is recorded into a large buffer. When the user is done, they click on the save icon which is triggered by a change, and the buffer is transferred via IrDA to a micro controller.

As you can see, I don't necessarily have an event which triggers an onclose handler which can check field-dirty. The user should be able to change the field using the keyboard, have the icon come up, and save the change. But the keyboard not causing an onchange is really messing up my customers right now.

Any other suggestions until this bug is fixed?


PostPosted: Wed Feb 22, 2006 1:02 pm
by nmc
Maybe you should have posted before that you need realtime update :-)

In this case, set a timer and check the field.dirty.

I had the same problem in one of my projects (using an autolocator for searching in a large db on a palm-card), and the timer-solution solved it.