Re: [Vala] How I do dump elements in global namespace?



umm... i see.

I maybe find minor bug about namespace.
I files it as 625996.

Thanks.

2010/8/3, Phil Housley <undeconstructed gmail com>:
On 3 August 2010 14:26, san hoi <hoisan49 gmail com> wrote:
Hi.

When I read vala-tutorial, I find fellowing sentense.

http://live.gnome.org/Vala/Tutorial#Namespaces
If you have to reference the global namespace explicitly due to ambiguity
you can do that with the global:: prefix.

I often use globals() in python. How I can enumerate its in vala?

Unlike dynamic languages, Vala doesn't have general support for
introspection. When the program is running, there is no registry of
names, so it isn't possible to enumerate an arbitrary namespace.

On the other hand, it isn't possible to put things into the global
namespace without some sort of declaration in the source, so you can
work out the globals from looking at the source.

--
Phil Housley




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]