Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!emmayche From: emmayche@dhw68k.cts.com (Mark Hartman) Newsgroups: comp.sys.mac.programmer Subject: Re: Casting in Think C Message-ID: <1990Dec10.174536.17002@dhw68k.cts.com> Date: 10 Dec 90 17:45:36 GMT References: <6167@munnari.oz.au> <3028@skye.cs.ed.ac.uk> Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 23 In article , phils@chaos.cs.brandeis.edu (Phil Shapiro) writes: >The only part of an object (in ThC) that indicates its class type is >the "Class ID". This is a word-sized number assigned to each class at >compile time. When you call a method, the method dispatcher, __msg(), >uses this number to determine which "method table" to use. Understanding that these "Class ID" numbers will vary from application to application (and even from compile to compile of the same application), they would still come in very handy for a "save state" kind of use. How is it possible to access these Class ID numbers and relate them to a class so that I can read an instance back in from a file and Bless() it to the proper class? Thanks -- Mark Hartman, N6BMO "What are you just standing there for? Where Applelink: N1083 or BINARY.TREE do you think you are, DIS-ney World??" Internet: emmayche@dhw68k.cts.com -- General Knowledge, from uucp: ...{spsd,zardoz,felix}!dhw68k!emmayche CRANIUM COMMAND