forked from rebolsource/r3
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Each call to view without providing own handler is adding the default view handler into handlers block here:
Lines 76 to 96 in baf7e6c
| ; Set up default handler, if user did not provide one: | |
| unless opts/handler [ | |
| handle-events [ | |
| name: 'view-default | |
| priority: 50 | |
| handler: func [event] [ | |
| print ["view-event:" event/type event/offset] | |
| if switch event/type [ | |
| close [true] | |
| key [event/key = escape] | |
| ][ | |
| unhandle-events self | |
| unview event/window | |
| quit | |
| ] | |
| show event/window | |
| none ; we handled it | |
| ] | |
| ] | |
| ] | |
| ] |
The default handler should be added only once or the handle-events function should replace handler with same name as the new one instead of adding it multiple times.
Metadata
Metadata
Assignees
Labels
No labels