id versus Class
id versus Class
- Subject: id versus Class
- From: Britt Green <email@hidden>
- Date: Wed, 5 Mar 2003 12:43:16 -0800 (PST)
>
Message: 15
>
Date: Wed, 05 Mar 2003 13:08:57 -0600
>
From: "Mondragon, Ian" <email@hidden>
>
Subject: RE: Newbie coming to Cocoa from the world of C++
>
To: email@hidden, email@hidden
<in deletia>
>
4) an id is an un-typed pointer to an object instance (determined at
>
runtime). a Class is a pointer to a class data structure:
>
>
id foo = [[AnyClass alloc] init];
>
id bar
>
Class baz = [AnotherClass class];
>
>
bar = [[baz alloc] init];
So id is used when the class may not be known, and Class is used when
the object *is* known, correct?
>
hope that helps a bit...
It does. Thank you, and to everyone else who wrote me, answering my
questions.
Best,
Britt
=====
"The ocean, she is strange and wonderous, filled with animals that disturb even a Frenchman."
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.