[Gambas-user] probably unreasonable requests
Benoit Minisini
gambas at ...2...
Wed Jul 9 23:19:53 CEST 2003
Le Mercredi 9 Juillet 2003 19:59, Rob a écrit :
> So what are the chances that
>
> (a) Gambas' parser could be tweaked such that rather than erroring out if
> you try to refer to a class with an initial lowercase letter (the only
> case-sensitive part of the language as far as I can see) it tries to
> evaluate the reference as a symbol and if it fails, then check case
> insensitively against the available classes? (back in the commodore 64
> BASIC days we used to call this an "error wedge"... ;) )
>
Yes, this is a problem. I could not easily solve it, because it breaks the
complete independance that exists between each compiled file. In other words,
I must tell the compiler which symbols are classes when it compiles a file,
because it cannot guess alone. I may fix it in the future...
> (b) event handlers such as KeyPress could optionally not automatically call
> the default event handler for the widget from which their class is derived?
> For example, if you want to implement a custom copy and paste routine,
> currently when the user types Ctl-V and your event handler does its thing,
> after it's done the control which generated the event gets the contents of
> the clipboard pasted to it again. Or more simply, if you want to put
> validation on a field such that a user is unable to type anything but
> digits, currently it's impossible. In VB, there's a ByRef "Cancel"
> parameter passed to the event handler which obviously wouldn't work in
> Gambas, but a mechanism to allow this would be nice.
Declare the KeyPress event handler as a function that returns a boolean, and
then returns TRUE to cancel the event propagation.
>
> (c) in combination with (b), is it possible for a form to receive events
> before its child controls do? I know Qt has the concept of an event filter
> but I don't know how it would fit into Gambas' Qt component.
No. What for ?
>
> I know, these are probably all issues for after the stable release, but I
> wanted to get them out there before I forgot.
>
> Rob
>
>
>
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list