Thank you, Caspar,
but the idea does not fullfill my desire.
Because there are some, or many, exceptions
which seems to be hard to overcome.

Exceptions.
1. When tapping undo button in the command toolbar
The field can be edited not only by the buttons or the menu
items (Undo, Cut, Copy and Paste) that I placed in my form,
but also by the buttons arranged in the command toolbar that 
emerges when the user enters the command keystroke.
When the user taps the undo button in the command toolbar,
the event does not comes to my event handler. (I experimented.)
And my undo-state variable gets unsynchronized.

2. When deleting relatively long string
When deleting relatively long string, Palm OS messages that
"This operation can not be undone", 
(as I presume from Japanese version of Palm OS machine). 
In this case, my undo-state gets unsynchronized, either.

3. When replacing relatively long string selection by Paste
Similarly as No.2 above, Palm OS messages that
"This operation can not be undone".
In this case, my undo-state gets unsynchronized, either.

4. When tapping different position in the field
Deleting just 1 character can be undone, and my undo-state
can be tracked at this moment. But the moment the user
taps different position in the field, undo-availabily disappears,
and my undo-state gets unsynchronized.

5.... (Though I can not list all now)


Regards,
Kazuyuki

----- Original Message ----- 
From: "Caspar Heiden, vd" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, November 24, 2003 6:17 PM
Subject: RE: How do I know whether undo is availa


In your undo function, call FldSetDirty (with false for second
argument).

Good luck,

Caspar

---
Kazuyuki writes:
FldDirty() returns true after the field has been modified,
even if undo is not available.

"steve" <[EMAIL PROTECTED]> writes:
>Perhaps the dirty bit can help you: FldDirty()

Kazuyuki writes:
>> I am writing an application that has an field, which user can
>> edit arbitrarily. I want to show my special undo-button
>> only if there is an action to undo for the field. I want to
>> hide it otherwise.
>> How do I know whether there is an action to undo or not?


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to