• 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
Cocoa Documentation on NSFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa Documentation on NSFormatter


  • Subject: Cocoa Documentation on NSFormatter
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Sat, 15 Dec 2001 14:44:07 +0100

I believe that the formatters are actually a great feature of Cocoa, but they are made difficult to use by the confuse documentation of NSFormatter (and TasksAndConcepts-ProgrammingTopics-DataFormatting too). You need to explain not only what each method do, but also they articulate together. That is: what happens exactly when the user types in or validate a textfield with a formatter?

Also I discovered today that the "obj" item returned by
getObjectValue:(id *)obj forString:(NSString *)exprstr errorDescription:(NSString **)error
is supposed to conform to NSCopying, since I got
*** -[myObjectClass copyWithZone:]: selector not recognized

Then, the correct declaration should be
getObjectValue:(id<NSCopying>*)obj forString:...
or even more likely should be
getObjectValue:(NSObject*<NSCopying>*)obj forString:...
because probably it is assumed that obj is a NSObject as well.

This sort of mistake makes very difficult to implement a custom formatter,
even after reading the Vermont Recipe 5.

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.


  • Follow-Ups:
    • Re: Cocoa Documentation on NSFormatter
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Cocoa Documentation Updated for December Tools Release (From: Matt Rollefson <email@hidden>)

  • Prev by Date: Re: NeXTWORLD floppy disk, anyone?
  • Next by Date: Re: Newbie SQL question...
  • Previous by thread: Re: Cocoa Documentation Updated for December Tools Release
  • Next by thread: Re: Cocoa Documentation on NSFormatter
  • Index(es):
    • Date
    • Thread