If the normal signature for the signal is:
func(canvas_item, event)
then if you connect the signal with:
item.connect("event", func, some_extra_arg)
the handler will be called with the signature
func(canvas_item, event, some_extra_arg)
You can add as many extra arguments as you want.
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
On Mon, 17 May 1999, J.W. Bizzaro wrote:
> Greetings.
>
> I connected an event handler to a gnome canvas. When an event occurs, the
> handler is passed the two default parameters, the canvas item and the event.
>
> canvas.box_group.connect('event', diagram_box_group_events)
> ...
> def diagram_box_group_events(canvas_item, event):
> ...
>
> If I try to pass another parameter to the handler, say a color, I must specify
> all three events. So
>
> diagram_box_group_events
>
> becomes
>
> diagram_box_group_events(...)
>
> But what do I put in there? I figured the canvas item is canvas.box_group, but
> what is the name for the event? It isn't canvas.box_group.event
>
> Maybe there is a way around this that I'm not seeing.
>
>
> :-)
> Jeff
> --
> J.W. Bizzaro mailto:[EMAIL PROTECTED]
> Boston College Chemistry http://www.uml.edu/Dept/Chem/Bizzaro/
> --
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
>
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]