[Seaside] Smalltalk question

Valdas Bucinskas valdas.bucinskas at ipsistemos.lt
Fri Aug 5 17:03:22 CEST 2005


Hi,
I guess what you want is:
Compiler evaluate: 'aClassName'
E.g. Compiler evaluate: 'Set'  gives an instance of Set class.

Valdas Bucinskas

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org]On Behalf Of Dmitry
Dorofeev
Sent: Friday, August 05, 2005 5:42 PM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: [Seaside] Smalltalk question


Hi all.

I'd like to create an instance of class by knowing only a class name.

something like this:

classname := anObject class asString , 'Controller'.
"expect something like FSBlockListController in a classname"

controller := Smalltalk giveMeInstanceOf: classname.
"expect result of /FSBlockListController new/ in controller"

I know it should be possible in Squeak in one line of code,
but i am still a newbie...

Thank you very much.

-Dmitry.
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/listinfo/seaside



More information about the Seaside mailing list