[Gambas-user] please don't take away the cancelling events thing :)
Rob
sourceforge-raindog2 at ...94...
Wed Oct 1 21:30:56 CEST 2003
On Saturday 20 September 2003 03:24, Benoit Minisini wrote:
> 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.
I'm currently editing a project written by someone at a client
site, and they do something like the following:
PUBLIC reallyclose AS Integer
...
PUBLIC FUNCTION Form_Close() as Boolean
if reallyclose < 1 then return true
END
PUBLIC FUNCTION QuitButton_Click()
try myprocess.kill
reallyclose = 1
ME.Close
end
In this way, they can disable QuitButton while a CD burn process
completes, and the user is unable to accidentally close the app
even with the normal close widget. (Obviously they could still
kill the process from a shell or something but their operators
don't know how to do that, generally.) It works well as
written.
Will you at least have a LAST.Cancel type of replacement if you
decide to do away with the FUNCTION...as Boolean method of
cancelling events? (Of course, that would be inconsistent with
the Key.Cancel and Mouse.Cancel methods you're describing...)
Maybe a new keyword CANCEL is what you're looking for... can't
get much clearer than that, can you?
Rob
More information about the User
mailing list