[REBOL] Re: list-style: event questions
From: brett:codeconscious at: 15-Apr-2002 20:50
> Hi, I read some stuff about the event system of VID and what I can do with
> 'feel thing. I'm trying to use a list-style where a function is called
> only once the redrawing/supplying of data/... (I don't which event to use)
> the list-style starts. And after finishing all the update to the
> other function should be called. Much like a constructor/destructor
> Anyway, I looked at the list-style object and saw that 'feel is 'none...
> so it must be set somewhere else.
> Can someone explain me how the propagation of events happens in VID? Where
> events enter the event-hierarchy? In which order are events handled for
> at the same event-hierarchy-level?
The event hierarchy as I understand it is.
(2) Face (feel)
My guess is that the operating system created window receives all the events
and then View converts these two REBOL events and dispatches them to the
appropriate face. Not all events received by the window are dispatched - I
think View does some interpretation and culling of a lot of raw events and
instead sends a more abstracted event to the face (eg. by calling engage).
> How can I find our which objects do have
In vid-ancestry, right click on a style to see the feel for that style. The
program identifies the feel object being used. Have a look at them for
button, check box etc.
The vid-ancestry program will help you see how the various styles work
and which have event handlers (FEELs).
The indentation shown in the program is used to indicate how the styles
were derived from each other - further to the right is more
> And after you answered all these general questions ;-)) how does the
> event-system for the list-style works? I didn't found an anchor to start
> For example, the supply function gets called even if you move the mouse
> list. Where is this set? I don't need this event and would like to exclue
You *do* need this event - and I don't think you can remove it.
It is probably the one that draws things on your screen. It or something
related evaluates PANE.
Allen wrote this a couple of days ago which is relevent here
(the key phrase being "face iteration"):
> List & supply is just a VID interface to face iteration in View. ("supply"
> is akin to a "pane func" with a little less effort needed)
> If you would like to dig further in iterated faces, the following Zine
> article may help.
> "Look ma, just one face"
The idea is that when you set the PANE to a function, the function gets
called to dynamically generate the screen image. Don't get trapped into
thinking that many faces are created - this is not the case. Actually
faces are "rubber stamped" to give the illusion of many faces.
This iterated face (calculated pane) approach is very powerful but
comes at a processing cost. The function appears to be called very many
LIST uses this method in order to implement SUPPLY. An easier style to
study is TEXT-LIST which also uses this technique. LIST creates a
function based on your specification. TEXT-LIST has a built in function
so this makes it easier to understand.
To see the definition of TEXT-LIST do the following program and click
once on TEXT-LIST. If you work out how TEXT-LIST is built it will help
you understand how LIST works.
do load-thru http://www.codeconscious.com/rebsite/vid-ancestry.r