• 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
Basic runtime function usage - objc_getClass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Basic runtime function usage - objc_getClass


  • Subject: Basic runtime function usage - objc_getClass
  • From: Francis Derive <email@hidden>
  • Date: Wed, 23 Nov 2005 17:11:21 +0100

Bonjour !

I beg the pardon of those who recently helped me, but now failed on this :

	id myPointerToClass = (Class *) objc_getClass("MYobject");
	if (myPointerToClass) {                                      // A
		NSLog(@"laClasse is registered");
		[...]
	}

In the Debugger Console I get this in A :


(gdb) print myPointerToClass
$1 = (struct objc_object *) 0x30038
	-- feel good shape

(gdb) print myPointerToClass->isa
$2 = (struct objc_class *) 0x30068
	-- feel good shape

(gdb) print myPointerToClass->isa->name
There is no member named name.
	-- what ? why ? No way to understand !

Execution follows to "laClasse is registered".

Sure I am missing big enough.

Merci beaucoup.

Francis.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Basic runtime function usage - objc_getClass
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: app icons
  • Next by Date: Using NSInvocation with a class method
  • Previous by thread: Save menu items disabled for my NSDocument
  • Next by thread: Re: Basic runtime function usage - objc_getClass
  • Index(es):
    • Date
    • Thread