[GUI] Another call for votes

Vincenzo Ciancia ciancia@cli.di.unipi.it
Wed, 19 Mar 2003 01:40:08 +0100


On Tue, 18 Mar 2003 23:44:51 +0000
Glynn Clements <glynn.clements@virgin.net> wrote:

> 
>  The point is that if:
> 
>  a) you want multiple callback procedures for a single event, and
>  b) you want to be able to de-register individual callbacks,
> 
>  then there has to be some way of specifying *which* callback
>  procedure you wish to de-register

Yes, this is clear; it's easy to get misunderstood on the web. I was
just saying to Daan, in the post you answered, that having multiple
callbacks, and so having to return something in the act of registration,
does not mean that one can't use nicer syntaxes (syntaxen?). If you want

 button [onClick =: doSomething]

you can have it, you will find your result, the unregister action, among
other fields in the result type. If you don't want to put it into the
"Button" datastructure, things get really complicated, yes it's so.

Notice that you are not requiring the user to pass a FunPtr to the
registration action anywhere, nor using it in the CGA, if the toolkit
provides multiple callbacks.

BTW, this behaviour would feel somewhat right to me: if you have a
"preferred" callback (or you are working with just one), this is the one
you'll find in the button's "unregister callback" field.

Vincenzo

-- 
Teatri vuoti e inutili potrebbero affollarsi
se tu ti proponessi di recitare te
[CCCP]