Re: Hillegass cocoa question
Re: Hillegass cocoa question
- Subject: Re: Hillegass cocoa question
- From: Andrew Farmer <email@hidden>
- Date: Thu, 23 Aug 2007 04:33:47 -0700
On 23 Aug 07, at 01:51, Martin Kyte wrote:
Hi Chaps
Ran into a puzzle in Aaron's book (Page 327 checking partial
strings in the Formatter for the typing tutor example) I added the
method
- (BOOL)isPartialStringValid:(NSString *)partial
newEditingString:(NSString **)newString
errordescription:(NSString **)error
{
. . . stuff
}
but cannot see how it ever gets called. Am I missing something or
is the book missing something.
You're missing something. That method is part of the NSFormatter
protocol* which you're implementing. Cocoa calls this method from
invisible parts of the runtime, just like drawRect: gets called on a
NSView.
*: It's not technically so much a protocol as an abstract class, if
you want to be picky about it.
_______________________________________________
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