|
I have multiple classes which I need to dynamically
instantiate at run-time, based on object definition data stored in a
database. Rather than the arduos approach of using a large and
redundant switch-case statement to deal with each and every class type,
is there a way to store the classes in, say, an array of classes? (my
terminology might not be quite correct there) Then instantiate any
given class type by indexing into the array with the appropriate index
(which would be stored in the database as part of the object definition
data). For example, instead of... switch ( whichclass ) Is there a way to do... new lz.classes[whichclass](); |
- [Laszlo-user] Dynamic run-time class instantiation m . laszlo-user
- Re: [Laszlo-user] Dynamic run-time class instantiatio... P T Withington
