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

Re: [Vala] Question about the number of g_key_file_get_groups() arguments



On 03/03/2008, heimdall_spe <heimdall_spe yahoo fr> wrote:
> Hi everybody,
>
>  I've got a problem for reading key "ini-like" file. I suppose I'm not
>  doing "thing" right, but please take a look, maybe a miss something :
>
>     //Read configuration file
>     public void read_conf_file(string conf_file){
>
>         try {
>             var conf_key = new GLib.KeyFile();
>             conf_key.load_from_file(conf_file, GLib.KeyFileFlags.NONE);
>             string[] key_group = conf_key.get_groups(null);

This method doesn't take any arguments, so in Vala simply write
nothing between the parentheses:

string[] key_groups = key_file.get_groups();

That works fine.

-- 
Phil Housley


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