Re: [Vala] How to get the local variables of a method?
- From: Jürg Billeter <j bitron ch>
- To: gege2061 <gege2061 redaction-developpez com>
- Cc: vala <vala-list gnome org>
- Subject: Re: [Vala] How to get the local variables of a method?
- Date: Sun, 10 May 2009 08:06:20 +0200
Hi,
On Sat, 2009-05-09 at 23:32 +0200, gege2061 wrote:
I continu my learning of the vala parser.
I seek to get the local variables of a method. I tested
Method.body.get_local_variables() but the list is empty.
What is the good way?
Local variables have block scope, which means that you might need to
call get_local_variables() on a child block of the method body. If you
want to list all local variables in a method, you need to iterate over
all block children and call get_local_variables() on each.
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]