• 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
determine which NSTextView is sending to delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: determine which NSTextView is sending to delegate?
      • From: Jonathon Mah <email@hidden>
    • Re: determine which NSTextView is sending to delegate?
      • From: stephane sudre <email@hidden>
  • Prev by Date: Re: Interface Creation
  • Next by Date: Re: determine which NSTextView is sending to delegate?
  • Previous by thread: Re: Is window a drawer?
  • Next by thread: Re: determine which NSTextView is sending to delegate?
  • Index(es):
    • Date
    • Thread