[REBOL] Re: windows events
From: greggirwin:starband at: 4-Oct-2001 11:08
Hi Cyphre,
<< insert-event-func func [face event][probe event/type return event]
view layout [button "hello"]
I hope this explains all the magic ;)
Don't forget to always 'return event' else your rebol will hangs! >>
That's great! Now, you also need to use remove-event-func, right? Are there
any good examples of how to use these effectively and robustly (
inserting/removing/finding event functions) or using them in other than a
global manner? For example, the source for insert-event-func looks like
this:
>> source insert-event-func
insert-event-func: func [
{Add a function to monitor global events. Return the func.}
funct [block! function!] "A function or a function body block"
][
if block? :funct [funct: func [face event] funct]
insert system/view/screen-face/feel/event-funcs :funct
:funct
]
Which shows them being inserted into
system/view/screen-face/feel/event-funcs. Are there any known examples of
using them with other faces? I didn't see any other feel items (from a quick
check) that contained event-funcs.
Thanks!
--Gregg