Re: Problems subclassing NSTextField
Re: Problems subclassing NSTextField
- Subject: Re: Problems subclassing NSTextField
- From: matt neuburg <email@hidden>
- Date: Mon, 25 Nov 2002 08:45:48 -0800
On Fri, 22 Nov 2002 18:15:05 +0200, Kalle Soiha <email@hidden> said:
>
My plan was simple: subclass NSTextField and override the -keyDown:
>
method.
>
>
Good and simple plan, yes, except that it does not work. My own
>
-keyDown: -method is not even called and the control works just like a
>
regular NSTextField. I cannot even seem to *break* the control in any
>
way
>
1) Why don't my overridden functions get called?
This is has been discussed many times here, so check the archives. The short answer is simple: when the user is typing an an NSTextField, it is not the NSTextField but its "field editor" that s/he is really typing in. Therefore it is the "field editor" whose behavior you would need to modify. m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.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.