• 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
id versus Class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: "Constant" strings are static or autoreleased?
  • Next by Date: Re: Resizing an NSOpenGLView
  • Previous by thread: Fwd: A weird Preview problem
  • Next by thread: RE: id versus Class
  • Index(es):
    • Date
    • Thread