• 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
NSPredicateEditorRowTemplate and templateView delegates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicateEditorRowTemplate and templateView delegates


  • Subject: NSPredicateEditorRowTemplate and templateView delegates
  • From: "Jim Turner" <email@hidden>
  • Date: Mon, 28 Apr 2008 10:12:11 -0500

I've a NSPredicateEditor with some basic popup-popup-view style
templates (where the view is a NSTextField).  I am attempting to set
the text field's delegate to one of my objects so I can be notified
when the control text changes.  Everything appears to be setup
correctly except my controlTextDidChange: never gets called.  I'm
setting the delegate in my view controller's awakeFromNib: as such:

for( NSPredicateEditorRowTemplate *template in [predicateEditor rowTemplates] )
{
	for( NSView *aView in [template templateViews] )
	{
		if( [aView isKindOfClass:[NSTextField class]] )
		{
			NSRect textFieldRect = [aView frame];
			textFieldRect.size.width += 150;

			[aView setFrame:textFieldRect];

			[(NSTextField *)aView setDelegate:self];
		}
	}
}

and 'self' does implement controlTextDidChange:  I realize the
template gets copied when it's used by the editor and I wonder if the
delegate isn't getting copied as well.  Is there a better way of
setting the delegate of a text field in a
NSPredicateEditorRowTemplate?

--
Jim
http://nukethemfromorbit.com
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSPredicateEditorRowTemplate and templateView delegates
      • From: Peter Ammon <email@hidden>
  • Prev by Date: Re: Failure on unarchiving a NSBezierPath
  • Next by Date: Re: Why is my NSTableView empty?
  • Previous by thread: Re: Why is my NSTableView empty?
  • Next by thread: Re: NSPredicateEditorRowTemplate and templateView delegates
  • Index(es):
    • Date
    • Thread