[Gambas-user] Getting an Object instance from a string
John Spikowski
support at ...2529...
Thu Dec 29 03:20:31 CET 2011
On Tue, 2011-12-27 at 22:03 -0300, Sebastian Kulesz wrote:
> 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!
>
Benoît has already responded on this but I'm currious, before using
Gambas, were you using the IUP (Portable User Interface) GUI library?
Your requests sounds very IUPish. ;-)
More information about the User
mailing list