NSPredicateEditorRowTemplate and templateView delegates
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