Thread View: chico.ect.help
1 messages
1 total messages
Started by D.A. Harris
Thu, 24 Sep 1998 00:00
Objective C
Author: D.A. Harris
Date: Thu, 24 Sep 1998 00:00
Date: Thu, 24 Sep 1998 00:00
30 lines
1529 bytes
1529 bytes
Ok, I'm trying to learn Objective C in a day. Does anyone know the language?
I'm reading through "Object-Oriented Programming and the Objective C
Language" a OpenStep book that Apple now sells. The thing that is
stumping me a little bit is the differance between a class method and
a instance method, maybe I'm just forgetting my OOP terminology, but
Objective C makes a definable differance between the two. So you
have an interface:
@interface MyClass : Object
{
int instance_var;
}
+ foobarClassMethod;
- (BOOL) foobarInstanceMethod;
@end
If you don't have a return type in () specified it returns the id class
type. All classes inherit from Object, like in SmallTalk, unless you
want to make a new root class (probably not a good idea), NeXTStep appears
to use NSObject instead of Object which the GNU compilers use.
So how is the class method used differantly than the instance method?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dale Harris <rodmur@csuchico.edu> PGP KeyID: E26EC5FD
http://www.ecst.csuchico.edu/~rodmur/
|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads