undoManagerForTextView:
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