I have a document based Core Date app.

MyDocument.nib contains among other things an NSSearchField (or NSTextField - 
same behaviour) which has it's value bound to some NSString in MyDocument.h.

When I type in this SearchField the window gets marked as dirty 
(documentEdited) and the Edit menu has an item "Undo Typing".

When I click somewhere else (so that the SearchField loosed it's blue focus 
ring) the window becomes clean again and the Edit → Undo menu item is disabled 
(light gray).

The problem: when I type in the SearchField and then close the (now dirty) 
window, a panel comes up with: "Do you want so save ... your changes will be 
lost otherwise ...", which I find extremely confusing, as the real data have 
NOT been changed at all.

Also: Undo for a SearchField is not really a necessary feature.

I unselected in InterfaceBuilder the "Allows Undo" for my NSSearchFieldCell. 
Now no more "Undo Typing" in the Edit menu, but still the window gets marked as 
documentEdited.

So how to make the NSSearchField refrain from messing with the documentEdited 
status of my window?

10.6.2

Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to