Hello,
well, it's very difficult for me to describe my problem in english, but I
will do my best:
I have a string, which contains a name of a Class. Now, I wants to create
this class. I can code it in php like this:

<?php

class test {

    function DoSomething() {
        echo "da";
    }

}

$name_of_class = "test";

$class = new $name_of_class();
$class->DoSomething();

?>
result: da

Here some code in JS, so you can see where my problem is:

[...]
qx.Class.define("myNameSpace.test1",
{
    extend: qx.core.Object,
    members :
    {
        DoSth: function()
        {
              alert("hello");
        }
    }
}
[...]

var Name_of_Class = "myNameSpace.test1";

var Object_of_Class = ???
Object_of_Class->DoSth();

The result should be a message box with hello.


But how can I do this in qooxdoo? I don't find anything usefull. I hope you
can help me again.
Thanks for you help (or the try to understand me)

Greetings from Germany
Julian

[DEUTSCH]
Hallo,
ich hab folgendes Problem: in einer Variable steht der Name einer Klasse.
Nun möchte ich von dieser Klasse ein Objekt erstellen, sodass ich auf die
Eigenschaften und Funktionen dieser Klasse zugreifen kann. Nur leider weiß
ich nicht, wie ich das mit qooxdoo machen kann. Code-Beispiel hab ich ja
oben schon angegeben, ich hoffe, die veranschaulichen mein Problem.

Ich hoffe mal, dass ihr mir da helfen könnt. Das ganze soll mal ein
PlugIn-System geben.

Viele Grüße
Julian

-----
My site:  http://projects-tutorials.de/ http://projects-tutorials.de/ 
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Create-Object-Name-of-class-in-a-string-tp5401636p5401636.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to