• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hillegass cocoa question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Hillegass cocoa question (From: Martin Kyte <email@hidden>)

  • Prev by Date: Is this good programming?
  • Next by Date: Informing one class about another class's methods
  • Previous by thread: Hillegass cocoa question
  • Next by thread: NSTextFiledCell in NSTableView doesn't truncate text if it contains a NSAttributedString
  • Index(es):
    • Date
    • Thread