• 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
Re: Dynamically getting the type of ivars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically getting the type of ivars


  • Subject: Re: Dynamically getting the type of ivars
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 13 Apr 2009 15:57:49 -0600

I understand the distinction, and your clarification has prompted me to think of another way I could do this. Currently, the code where I'm getting the list of Ivars is in a class method. However, I also have an instance method where I'm doing something very similar. I could move the type getting into that method, since in there I'm calling [self valueForKey:]...

If this seems mysterious to you, I'll post again when I've got it working right and explain what I'm up to.

Thanks again,

Dave

On Apr 13, 2009, at 3:32 PM, Kyle Sluder wrote:

On Mon, Apr 13, 2009 at 5:29 PM, Dave DeLong <email@hidden> wrote:
Thanks for the definitive answer. My observations indicate that every
statically typed object has a type encoding of @"ClassName", so I'm going
ahead with my original plan to pull the class out of that (I still don't
like it, but I need that class).

There is no such thing as a "statically typed object." All of the type information that the compiler has simply disappears after compilation is done. The only type information available at runtime is an object's isa pointer.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Dynamically getting the type of ivars (From: Greg Guerin <email@hidden>)
 >Re: Dynamically getting the type of ivars (From: Dave DeLong <email@hidden>)
 >Re: Dynamically getting the type of ivars (From: Greg Parker <email@hidden>)
 >Re: Dynamically getting the type of ivars (From: Dave DeLong <email@hidden>)
 >Re: Dynamically getting the type of ivars (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Exit an Application
  • Next by Date: Re: Dynamically getting the type of ivars
  • Previous by thread: Re: Dynamically getting the type of ivars
  • Next by thread: Re: Dynamically getting the type of ivars
  • Index(es):
    • Date
    • Thread