Joachim Baran
2010-04-13 18:24:54 UTC
Hi!
Is it possible to instantiate an object just by its classname?
I would like to dynamically load classes into my application that are
given under "build-script"/"settings" in config.json. Right now, I am
trying to see of the class is available in general by calling
'qx.Class.isDefined("test.Contribution");'. Surprisingly (to me) the
method returns 'false' unless I explicitly create an object with 'new
test.Contribution();' first. Of course, I would like to avoid that,
because I want do not want to modify my application and instead only
"plug-in" objects by just giving their classnames.
Thanks,
Joachim
Is it possible to instantiate an object just by its classname?
I would like to dynamically load classes into my application that are
given under "build-script"/"settings" in config.json. Right now, I am
trying to see of the class is available in general by calling
'qx.Class.isDefined("test.Contribution");'. Surprisingly (to me) the
method returns 'false' unless I explicitly create an object with 'new
test.Contribution();' first. Of course, I would like to avoid that,
because I want do not want to modify my application and instead only
"plug-in" objects by just giving their classnames.
Thanks,
Joachim
--
B.1079 Michael Smith Building
Faculty of Life Sciences
The University of Manchester
Oxford Road
Manchester
M13 9PT
United Kingdom
B.1079 Michael Smith Building
Faculty of Life Sciences
The University of Manchester
Oxford Road
Manchester
M13 9PT
United Kingdom