Re: NSTextView redraw while resigning first responder
Re: NSTextView redraw while resigning first responder
- Subject: Re: NSTextView redraw while resigning first responder
- From: vincent habchi <email@hidden>
- Date: Sun, 8 Aug 2010 07:15:35 +0200
Le 7 août 2010 à 22:35, Kyle Sluder a écrit :
> Please describe your text system setup. Is it possible your custom glyph generator is only being used for the field editor, not for the text field's layout manager?
Of course Kyle, you're a genius! I wonder what this list would be without your ongoing support. The code was this:
glyphChanger = [[GlyphChanger alloc] init];
[[(NSTextView *)[myWindow fieldEditor:YES forObject:nil] layoutManager] setGlyphGenerator:glyphChanger];
so no wonder it went away when the text field resigned first responder status.
By the way, can anybody explain me why the call [window fieldEditor: forObject:] returns a NSText *, while the documentation explicitly states it returns a NSTextView * (so I had to cast it to get access to the -layoutManager method)?
Thanks again,
Vincent_______________________________________________
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