Re: user_data for callbacks



Hello Daniel,

Daniel Drake [2012-09-25 11:24 -0600]:
> Similarly, I am forced to provide a user_data parameter in my callback
> function to receive the value that was passed, otherwise python throws
> an exception about the callback receiving the wrong number of
> arguments.
> 
> Is this the intended behaviour, or is there a bug somewhere?

It's intended. In general GI does not make any argument optional;
some are provided by pygobject itself, such as self and
GDestroyNotifys, but not others.

There might be some overrides which make the user_data argument
optional for backwards compatibility reasons, but it's not the common
case.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


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