[REBOL] Re: VID
From: carl:cybercraft at: 30-Sep-2002 20:31
On 30-Sep-02, Arnaud Dutartre wrote:
> Could it be possible to have access to VID source code ? It is a .r
> file isn't it ?
The (uncommented:) source code to VID is part of View. For
instance...
>> probe first system/view/vid
[self verbose warn word-limits vid-feel icon-image radio.bmp
radio-on.bmp vid-colors vid-face state-flags vid-words vid-styles
track error warning facet-words fw-with fw-feel spot expand-specs
grow-facets do-facets next-tab choice-face set-edge]
Note the first there. VID's an object and a big one and it takes a
long time to show it all. But by using first we can look at just the
words in the object.
You can continue inwards like that...
>> probe first system/view/vid/vid-feel
[self sensor hot hot-area radio led check button icon subicon toggle
rotary choice choice-iterator drag-off drag slide progress]
>> probe first system/view/vid/vid-feel/button
[self redraw detect over engage cue blink]
>> probe first system/view/vid/vid-feel/button/engage
** Script Error: engage is missing its face argument
** Near: probe first system/view/vid/vid-feel/button/engage
engage is a function, not an object, hence the error. So...
>> probe get in system/view/vid/vid-feel/button 'engage
func [face action event][
switch action [
time [if not face/state [face/blinker: not face/blinker]]
down [face/state: on]
alt-down [face/state: on]
up [if face/state [do-face face none] face/state: off]
alt-up [if face/state [do-face-alt face none] face/state: off]
over [face/state: on]
away [face/state: off]
]
cue face action
show face
]
You get the picture.
Scott Jones made a nice post about this recently. It includes a
method to save a text-file of the whole system code, which includes
VID of course...
http://www.escribe.com/internet/rebol/m25769.html
--
Carl Read