Re: [Vala] error: too many arguments to function
- From: "Jan Hudec" <bulb ucw cz>
- To: "Dru Moore" <dru dru-id co uk>
- Cc: vala-list gnome org
- Subject: Re: [Vala] error: too many arguments to function
- Date: Thu, 22 Jul 2010 11:47:23 +0200 (CEST)
On Wed, July 21, 2010 15:41, Dru Moore wrote:
Hi all,
Not sure if this is a bug or user error, but I am getting an error
from the c compile stage of my program:
error: too many arguments to function
'hildon_wizard_dialog_set_forward_page_func'
From hildon-1.vapi file
public void set_forward_page_func (Hildon.WizardDialogPageFunc
page_func, void* data, GLib.DestroyNotify destroy);
This is a bug. It should be:
public void set_forward_page_func (owned Hildon.WizardDialogPageFunc
page_func);
The data and destroy arguments are implicit in that.
Form my vala source
this.set_forward_page_func(forward_page_function, &app_settings,
(GLib.DestroyNotify)destroy_notify);
Obviously when the 2 extra arguments go away here, they'll go away
in your code too. It will be:
set_forward_page_func(this.forward_page_function);
Note, that there should be no "data" argument in the
Hildon.WizardDialogPageFunc declaration either. The
C function has it, but it's used to pass the invocant
if passing method or the closure if you pass closure.
--
- Jan Hudec <bulb ucw cz>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]