Re: Defining custom GObject signals with itself as an argument



On Sat, 21 Mar, 2015 at 3:43 PM, Michael Gratton <mike vee net> wrote:
I am trying to create a GObject subclass in Python3 that has instances
of the class itself as one of the signal's arguments.


Oh! I just realised that the source object will be passed through as the frist arg to the signal handler, even if you don't add it as an arg in the signal definition.

I'd still like to know if there's a workaround, since I'd also like to be able to do the following:

> class Primary(GObject):
> __gsignals__ = { 'activate': (Object.SIGNAL_RUN_FIRST, None, (Secondary,)) }
>
> class Secondary(Object): pass

Without, counter intuitively, having to define Secondary first.

Thanks,
//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>




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