swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What class are you?


From: Dwight Wilson
Subject: Re: What class are you?
Date: Wed, 24 Sep 1997 11:34:30 -0400 (EDT)

>I'm having to track down a bug where an object appearing in a list is not
>the kind it is supposed to be (!).
>
>Does anyone know what the syntax is for getting the class name of the
>offending object back, as a printable string?

Try the function:

class_get_class_name(Class class)

>In fact, the Next book discusses many methods in its early chapters that
>are not mentioned in the formal language definition, which leads me to
>believe the runtime system is involved. So: where do I find comprehensive
>documentation for the objects and methods available with the GNU version of
>ObjectiveC?

On a Linux system, you can look in the rather obscure directory:

/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc

The files objc.h and objc-api.h are of particular interest.  While
the functions aren't documented, you'll at least get a list of 
functions available.  The lack of documentation is annoying and leads
to such questions as

What's the difference between these functions?
Class objc_get_class(const char *name)
and
Class objc_lookup_class(const char *name)

And, what does this intriguingly named function do?
Class class_pose_as(Class imposter, Class superclass)

I suppose I'll eventually be desperate enough to download the 
runtime source and look through it.

-Dwight

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]