[Gambas-user] Unknown symbol in module with variable set
Benoît Minisini
gambas at ...1...
Sun Feb 19 23:37:00 CET 2012
Le 17/02/2012 21:32, Sebastian Kulesz a écrit :
> Hi. I'm getting an unusual error in a large project when trying to
> access a property of a module using an initializer to execute custom
> code in a large set of modules.
> The simplified code can be seen in the attached project. When
> executed, it complains about an unknown symbol, but in the stack it's
> listed.
> Is this a bug or an error in my code?
>
> Tanks!
>
An error in your code.
If you use Me in a static method like asd.me(), you will get a special
internal value that represents the asd class, and that is converted to a
'Class' object (as Class["asd"] would return) when being passed as an
argument to the Main.Load() method.
And an instance of the 'Class' class does not have the public symbols of
the 'asd' class, as you expected.
Regards,
--
Benoît Minisini
More information about the User
mailing list