If I understand correctly, you want to declare class type dynamically,
not name...
( http://gambasdoc.org/help/lang/new?v3 )

I'm not sure you can do it that way... but maybe you should use
integer variable that denotes
what type is needed to declare.
Then;

Dim SomeObject as New Object

Select case iClasstype
case 1
SomeObject = New Class1
case 2
SomeObject = New Class2

....


Jussi


On Tue, Apr 21, 2009 at 16:51, Stefan Miefert <smief...@kikxxl.de> wrote:
> Hello,
>
> how can i creat a class  having  a dynamic name?
>
> for example.
>
> I have some classnames in my database and want now do this
>
> DIM cclass as class
> Dim var = "myclassname"
> Class = new var
>
> But that dosent run:( He takes the var  as the class "var"
>
> How can I use the content  of the var?
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to