Re: Cocoa Documentation on NSFormatter
Re: Cocoa Documentation on NSFormatter
- Subject: Re: Cocoa Documentation on NSFormatter
- From: Thomas Lachand-Robert <email@hidden>
- Date: Sun, 16 Dec 2001 22:23:07 +0100
Le dimanche 16 dicembre 2001, ` 09:50 , Vince DeMarco a icrit :
This is why you should spend some time and look at all of the examples on
the system. They all cover alot of stuff there.
I already spent a lot of time reading the documentation for most classes
in Foundation and AppKit, and reading a number of examples, too. I didn't
come to that one because I didn't intend to create a palette in IB, and
'busyPalette' really looks like an example of a palette...
I don't understand sme point in their code, though. The readme says:
The main requirement Interface Builder has of a widget is that it
implements the NSCoding protocol (initWithCoder: and encodeWithCoder).
In the case of ExpressionFormatter and ExpressionEvaluator archiving
was not necessary because:
ExpressionEvaluator has no state and thus doesn't need to archive
anything.
Ok but ExpressionEvaluator doesn't even declare NSCoding nor its methods,
which means that IB cannot even call initWithCoder on it? So probably
IB can actually accept widget that doesn't implement NSCoding protocol,
assuming that if they don't, they have nothing to encode? The sentence
seems misleading, if this is true.
Its superclass does all of the real work. The subclass just lets you
enter the expression then its passed to the superclass.
Eh? The superclass of ExpressionEvaluator is NSObject, which doesn't
implement NSCoding (to my knowledge)?
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.