swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class versus Protocol usage?? (was Re: One problem, one distraction


From: Marcus G. Daniels
Subject: Re: Class versus Protocol usage?? (was Re: One problem, one distraction
Date: 04 Feb 1999 10:05:58 -0800

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

MD>  Where is getXDimNumber defined?

PJ> It is defined in the WhiteRaster class, and when the program runs
PJ> the method does get found. It just the compiler warnings that bug
PJ> me.

Although it seems strange to put this information in a Raster, you
should be able to include WhiteRaster.h in Citizen.m to avoid the warning.

PJ>From looking at the Next book on objective-c, I get the idea the
PJ> declaration ought to be something that has a class name where I have
PJ> ZoomRaster, and then follow that with <ZoomRaster>. So is ZoomRaster a
PJ> class instead of a protocol? What class name to put there, I've got no
PJ> clue, if I want to follow the Next book and write it as:

The <Protocol> syntax means that the compiler is supposed to check 
that the subclass implements the protocol.  In other words, that your
variant Raster is still valid as far as Swarm's idea of how a Raster should
interact.

PJ> Also, it is correct that such an object inherits all protocols that
PJ> ZoomRaster conforms to?

Yes.

PJ> I want to
PJ> assign a name because there are going to be rasters created, all named
PJ> "policyRaster" and added to a list, and there's no name change to
PJ> differentiate them.

You can send Rasters the message setWindowGeometryRecordName: to do that.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]