missing textDidEndEditing: NSTextView delegate messages
missing textDidEndEditing: NSTextView delegate messages
- Subject: missing textDidEndEditing: NSTextView delegate messages
- From: Alex Rice <email@hidden>
- Date: Sat, 16 Nov 2002 02:03:02 -0700
I could use some ideas for debugging this one!
The scenario: I have an NSTextView and it's delegate is my NSDocument
class. The NSTextView is originally in a NSDrawer, but I swap the
contentView of the drawer into a Panel, and back into the drawer. It's
a tear-off inspector thingy.
The problem: Delegate method textDidEndEditing: does not get called
when the NSTextView is in the Panel. textDidEndEditing: does get called
when it's in the Drawer. The delegate never changes; it's the same
object throughout.
What's strange about it is that textDidChange: does get called no
matter whether the NSTextView is in the drawer or the panel. Leaving me
with the workaround below. Does anyone have any ideas where I messed
up, or could this be a Appkit bug?
-(void) textDidChange:(NSNotification *)aNotification
{
if (([aNotification object] == notesTextView) &&
([[self model] panelInspector]))
{
// this is a workaround for
// textDidEndEditing:(NSNotification *)notification
// seemingly not firing when the textview is in the
// inspector panel.
[self textDidEndEditing: aNotification];
}
}
Thanks,
Alex Rice <email@hidden>
Mindlube Software
http://mindlube.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.