• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
sheets and undo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sheets and undo


  • Subject: sheets and undo
  • From: Ken Victor <email@hidden>
  • Date: Sat, 5 Nov 2005 15:37:07 -0800

i have a window that is displayed as a sheet. this window contains an NSTabView. some of the tabs contain an NSTableView and another tab contains severl NSTextFields. i was finally able to get undo/redo of text editting to work, but i'm not sure that this is what i should have to do...

in my sheet window, i have a validateMenuItem that will enable undo/redo of the sheet's undoManager canUndo/canRedo. the sheet also has undo:/redo: methods which is simply passes on to its undoManager.

on the parent window (ie, the window that has the sheet), i also had to have validateMenuItem/undo/redo methods. each of these methods checks to see if there is an attached sheet and if that attached sheet respondsToSelector: _cmd. if the attached sheet does respond, then the parent simply "forwards" the message to the sheet, otherwise it handles it itself.

is this truly what is necessary? ie, am i doing something wrong that is necessitating this approach? if i am doing something wrong, how does one get text editting undo to work for text on sheets? if i'm not doing anything wrong, is this a bug in that undo/redo doesn't work "out of the box" without the above approach?

thanx,
ken

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSPropertyDescription userInfo
  • Next by Date: Re: Preferences in a separate nib file
  • Previous by thread: Re: RunLoops
  • Next by thread: Strange behaviour of scanFloat
  • Index(es):
    • Date
    • Thread