cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to capture the Editor UNDO event?

ptc-1004736
1-Newbie

Any way to capture the Editor UNDO event?

Is there any way to capture the Editor 5.2 M030 Undo event? I have a situation where an element is locked using oid_read_only. If the user deletes the element then does an undo, the element is inserted back into the document but as unlocked. I'd like to capture the undo event so that I can then examine the element and lock if necessary. I've tried the paste andthe various insert_tag hooks but nothing seems to capture the insertion of the undo buffer.

1 REPLY 1

Todd,
While the help file in 5.2 doesn't seem to cover it, a quick
search-n-skim of the ACL files distributed with Editor turns up
packages/main/_dochook.acl, which provides some details about document
callbacks, including both the ones listed in the help file and some that
are not. The "undo" callback would be used with a function like:

my_undo_cb(doc, detail, oid1, pos1, oid2, pos2)

The "doc" argument is, like most callbacks, the id of the document
in which the undo is happening. I'm not sure about the "detail"
argument, so you may have to experiment to see if it provides any useful
information to you. The last four arguments seem to indicate the area
of the document that will be affected. I only played with this a little
bit, so you'll probably need to experiment some to see what you'll get
for various types of undo operations.
Hope this helps...

Brandon Ibach
Lockheed Martin Space Systems
Cape Canaveral, FL
321-476-7051


Announcements