• 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
object_getInstanceVariable() - Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

object_getInstanceVariable() - Problem


  • Subject: object_getInstanceVariable() - Problem
  • From: Michael Monscheuer <email@hidden>
  • Date: Tue, 02 Dec 2003 20:34:40 +0100

Has anyone successfully used the function object_getInstanceVariable() ?

I stepped through my program with debugger and found out, that it is not working as documented.

Documentation says:
----
Ivar object_getInstanceVariable
(id object, const char *name, void **value);
(..)
value:
A pointer to a pointer to a value. On output, contains a pointer to the value of the instance variable.
----

But instead of a returned pointer in **value, the value itself is returned! So if I try to access the variable value via
NSValue's value:WithCType: I consequently get some bad accesses...

So how to get the address of an instance variable correctly?
Is this really a bug, that I stepped into?

Thanx in advance...
--
=======================================================
And refashioning the fashioned
lest it stiffen into iron
is work of endless vital activity.
[Goethe]

mailto:email@hidden
mailto:email@hidden

All about CALAMUS DTP suite:
http://www.calamus.net

=======================================================
_______________________________________________
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.

  • Follow-Ups:
    • Re: object_getInstanceVariable() - Problem
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: makeWindowControllers question
  • Next by Date: re: Panther and Project Builder
  • Previous by thread: Re: makeWindowControllers question
  • Next by thread: Re: object_getInstanceVariable() - Problem
  • Index(es):
    • Date
    • Thread