Hi Carl,

As Anton has shown, it finds a face that has the specified shortcut key
defined on it. It is called by another part of VID to implement shortcut
keys for VID layouts. Based on the logic of this function I wrote a few face
search functions that find faces given a function that tests a condition:

    http://www.codeconscious.com/rebsite/rebol-library/face-searches.r

In answer to the next question "what have you used these for?", I used them
in my "Play app" demos on Rebiste "Code. C.".
These demos were an experiment automating pre-existing view applications
.eg. Calculator, Effect lab. My demo uses the search functions to find
buttons and activate them, etc. finally taking a screen (face) capture of
the resulting screens.

Given your explorations of the face (and it pane) resulting from the Layout
function, I thought you might be interested.

Regards,
Brett


----- Original Message -----
From: "Anton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 1:10 PM
Subject: [REBOL] Re: Examining the layout object


> Well, as written right in front of you, it's a char! or a word!
> >From memory, there are words like:
> 'page-up, 'page-down, 'left or 'left-arrow...
> floating around in VID-land somewhere.
> Otherwise, it's a specific character.
>
> Here's a quick test I did.
> A layout with a button that responds to the "h" key
> (but does nothing about it...)
>
> lay: layout [button #"h" "Hello"]
>
> find-key-face lay #"j"  ; == none
> find-key-face lay #"h"  ; does not return none - a good sign
>
> probe get in find-key-face lay #"h" 'style  ; == button
>
> We seem to have found the button.
>
> Anton.
>
> > Hmm.  I can't get find-key-face to return anything but a none or an
> > error - probably because I don't know what a keycode is...
> >
> > >> ? find-key-face
> > USAGE:
> >     FIND-KEY-FACE face keycode
> >
> > DESCRIPTION:
> >      Search faces to determine if keycode applies.
> >      FIND-KEY-FACE is a function value.
> >
> > ARGUMENTS:
> >      face -- (Type: object)
> >      keycode -- (Type: char word)
> >
> > What's the function for?
> >
> > --
> > Carl Read
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to