• 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
undoManagerForTextView:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undoManagerForTextView:


  • Subject: undoManagerForTextView:
  • From: email@hidden
  • Date: Thu, 22 Jun 2006 15:05:54 +0200 (CEST)
  • Importance: Normal

 Hello all,

 I have two related questions about the
-undoManagerForTextView: method in NSTextView :

1) Why does it have an argument at all ? It looks redundant.
If, say, you want to access the undo manager of myTextView,
you would type

   NSUndoManager* manager=[myTextView undoManagerForTextView: myTextView];

  Wouldn´t it be more logical if it was a class method :

 +(NSUndoManager*) undoManagerForTextView: aTextView;

or a method without argument :

 -(NSUndoManager*) undoManagerForTextView;


2) I subclassed NSTextView and used undoManagerForTextView: on my subclass
in my code.
The project builds fine but crashes at runtime, and the console explains that
my subclass does not recognize the selector @(undoManagerForTextView:). Why ?
If I read the NSTextView.h file correctly, the method
undoManagerForTextView is protected, so it should also work with
a subclass.


                                Ewan



 _______________________________________________
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

  • Follow-Ups:
    • Re: undoManagerForTextView:
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: How to force an initial column sort with NSTableView and controller?
  • Next by Date: Cocoa Application build fails gives unknown symbol '___dso_handle'
  • Previous by thread: Re: How to force an initial column sort with NSTableView and controller?
  • Next by thread: Re: undoManagerForTextView:
  • Index(es):
    • Date
    • Thread