Le 28/12/2011 02:03, Sebastian Kulesz a écrit : > Hi! I am having some problems when using the Object.GetProperty method > when the object parameter to be used is stored in a string. The > structure of my project is as follows > > ============ > Module Module1{ > > public Var1 as string > > } > > > ============ > Module Main (Starting class){ > > public sub Main() > > DIM sModule as String > > sModule="Module1" > > Object.GetProperty(sModule, "Var1") > > END > > } > ============ > > The normal behavior is to know the first parameter of the GetProperty > method, hence calling Object.GetProperty(Module1, "Var1"), but i need > the first parameter to be dynamic, therefore being of a type different > than object > > I would like to know if there is a way to get an instance of an object > by knowing the class/module name, or if the GetProperty method can be > modified to accept a string as a parameter, same as the second > argument > > Thanks! >
Hi, All that is non-sense for me. You can handle an object only through a reference on it (a.k.a. pointer in other languages). A class/module name is just its name. It won't tell you anything about its instances. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user