🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.software
Article #1006

class instances from class name strings

#1006
From: chris Chris Larson
Date: Fri, 09 Oct 1992 18:47
20 lines
936 bytes
I would really like to be able to setup a list of character strings that represent  
classes, and at run time be able to create an instance of the class from the class name.

An example:

classList[] = {
"Class1",
"Class2"};

then at run time do some type of alloc & init from the class name. ie:

newClass = [[classList[0] alloc] init]

Any ideas?

Chris
-- 
Chris Larson  <==>  chris@oceania.com  <==>  NeXT Mail is cool
Oceania Health Care Systems                      Palo Alto, CA
The Software Ranch                               Park City, UT
Technical Details
Message-ID: <BvvAv9.2tD@oceania.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!oceania!chris

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.software
Path: arc1-ca.pugleaf.net!sparky!uunet!oceania!chris
From: chris (Chris Larson)
Subject: class instances from class name strings
Message-ID: <BvvAv9.2tD@oceania.com>
Sender: chris@oceania.com (Chris Larson)
Reply-To: chris@oceania.com
Organization: Oceania Health Care Systems
Distribution: na
Date: Fri, 9 Oct 1992 18:47:32 GMT
Lines: 20