[Gambas-user] gambas 0.70

Benoit Minisini gambas at ...2...
Sat Sep 20 09:24:30 CEST 2003


Le Vendredi 19 Septembre 2003 23:25, Benoit Minisini a écrit :
> 5) Completely reworked event handlers for keyboard and mouse events.
>
> I give you examples:
>
> PUBLIC SUB MyControl_KeyPress(Ascii AS String, Code AS Integer, State AS
> Integer)
> ...
> END
>
> becomes
>
> PUBLIC SUB MyControl_KeyPress()
> ...
> ' Use Key.Text, Key.Code, Key.Shift, ...
> ...
> END
>
> PUBLIC SUB MyControl_MousePress(X AS Integer, Y AS Integer, Button AS
> Integer) ...
> END
>
> becomes
>
> PUBLIC SUB MyControl_MousePress()
> ...
> ' Use Mouse.X, Mouse.Y, Mouse.Left, Mouse.Shift, ...
> ...
> END
>
> See the ChangeLog for more details.
>
> This is the worse for everybody, because all keyboard and event handlers in
> every gambas project must be rewritten to work with this version :-)
>
> So I have only two words: cheer up !
>
> Regards,

I forgot to write in the ChangeLog that to cancel a keyboard event, you must 
type Key.Cancel = TRUE and not return TRUE anymore.

I think I will drop the feature of returning something from an event handler. 
At the moment, only keyboard events were concerned.

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list