• 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: Chris Hanson <email@hidden>
  • Date: Mon, 13 Apr 2009 14:59:58 -0700

What are you really trying to accomplish using the class information of an instance variable?

Generally you should treat instance variables as 100% private to their class; their uses can change from version to version?

  -- Chris

On Apr 13, 2009, at 2: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).

Dave

On Apr 13, 2009, at 2:44 PM, Greg Parker wrote:

On Apr 13, 2009, at 1:41 PM, Dave DeLong wrote:
Still not what I'm looking for. I have an Ivar pointer, and I want to get its static type (if it has one).

You can't. The runtime metadata for ivars does not include the static type for objects. Sorry.


The BridgeSupport metadata for system libraries might include more info, but I don't know if it records any ivar information.
_______________________________________________

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
_______________________________________________

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>)

  • Prev by Date: Re: Dynamically getting the type of ivars
  • Next by Date: Best way to get a non-repeating random number?
  • Previous by thread: Re: Dynamically getting the type of ivars
  • Next by thread: Simple mac server app seems can't receive incoming connection (code signing problem?)
  • Index(es):
    • Date
    • Thread