multiple NSTextFields and undo problem
multiple NSTextFields and undo problem
- Subject: multiple NSTextFields and undo problem
- From: "email@hidden" <email@hidden>
- Date: Sun, 15 Feb 2009 14:12:42 -0800
i've got a window that has several editable NSTextFields (and other
controls and views). if i do some editting in one of the fields and
then select another field (tab or click another text field), as you
can see in the below stack trace, this results in a call to
-[NSUndoManager removeAllActions]. as i often have other undo actions
for this window, and i use one undo manager for all activity for this
window, this is destroying my undo stack! it seems to me that instead
of calling removeAllActions while a text view resigns FirstResponder,
it should instead be calling -[NSUndoManager
removeAllActionsWithTarget:].
#0 0x93389675 in -[NSUndoManager removeAllActions]
#1 0x906112e9 in syncTextWithTextView
#2 0x904b1b2c in -[NSActionCell setObjectValue:]
#3 0x904b1653 in -[NSCell setStringValue:]
#4 0x90633353 in -[NSTextField textDidEndEditing:]
#5 0x93320e1a in _nsnote_callback
#6 0x970e98da in __CFXNotificationPost
#7 0x970e9bb3 in _CFXNotificationPostNotification
#8 0x9331e080 in -[NSNotificationCenter
postNotificationName:object:userInfo:]
#9 0x90632b93 in -[NSTextView(NSSharing) resignFirstResponder]
#10 0x905a8b0d in -[NSWindow makeFirstResponder:]
my original code for this window goes back to early 2006 and this
(destroying the undo stack) wasn't happening then. unfortunately, i
haven't fully exercised this code, with undo, since then, so i don't
know when the change/bug was introduced.
i've filed bug id# 6589070 for this.
in the meantime, can anyone recommend a work around?
thanx,
ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden