determine which NSTextView is sending to delegate?
determine which NSTextView is sending to delegate?
- Subject: determine which NSTextView is sending to delegate?
- From: John James <email@hidden>
- Date: Fri, 5 Nov 2004 06:57:09 -0500
Is there a way to use IB to mark a NSTextView in some way so that the
info can be retrieved by the delegate to determine which view is
sending the message. (in my case "textDidEndEditing"). I could
subclass but it seems this should be a common task and settable in IB.
all the demos I can find only have one NSTextView.
I tried to check the title of its container view (NSBox). but that
does not seem to respond to '-title' message. Maybe I am not getting
the container object correctly:
-(void) textDidEndEditing:(NSNotification *) notification
{
NSText* tx = [notification object];
NSView* view = [notification object];
NSView* sview = [view superview];
NSBox* box = (NSBox*)sview;
NSString* title = [box title]; <--- debugger seems to leave here
...
}
Thanks for Help
John
_______________________________________________
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