updated the X11.moo sample code

This commit is contained in:
hyunghwan.chung 2018-10-08 13:17:11 +00:00
parent 9ad9299dea
commit b16347e2d9

View File

@ -74,6 +74,7 @@ class X11(Object) from 'x11'
method __destroy_window(window_handle) method __destroy_window(window_handle)
{ {
| w | | w |
###('DESTROY ' & window_handle asString) dump.
w := self _destroy_window(window_handle). w := self _destroy_window(window_handle).
if (w notError) { self.window_registrar removeKey: window_handle } if (w notError) { self.window_registrar removeKey: window_handle }
} }
@ -657,21 +658,17 @@ extend X11
{ {
| widget mthname | | widget mthname |
widget := self.window_registrar at: llevent window. widget := self.window_registrar at: llevent window ifAbsent: [
if (widget isError)
{
System logNl: 'Event on unknown widget - ' & (llevent window asString). System logNl: 'Event on unknown widget - ' & (llevent window asString).
^nil ^nil
}. ].
mthname := self.llevent_blocks at: llevent type. mthname := self.llevent_blocks at: llevent type ifAbsent: [
if (mthname isError) System logNl: 'Unknown event type ' & (llevent type asString).
{
System logNl: 'Uknown event type ' & (llevent type asString).
^nil ^nil
}. ].
^self perform (mthname, llevent, widget). ^self perform(mthname, llevent, widget).
} }
method __handle_notify: llevent on: widget method __handle_notify: llevent on: widget