Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Examining the layout object

From: carl:cybercraft at: 4-Jul-2002 0:13

On 03-Jul-02, Brett Handley wrote:
> 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: >
> 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.
Thanks Brett (and Anton.) Yes, it's something that could prove useful. Oh, and my little script was a wee bit bugged. (: It would print the same object twice if its pane was an object and not a block. Fixed with this version... REBOL [] examine-lo: func [face][ style: func [face][ if error? try [return join " Style: " face/style][""] ] examine: function [face spaces][panes][ prin join spaces type? :face if not object? :face [print "" exit] print style :face append spaces " " panes: get in face 'pane either block? :panes [ print rejoin [spaces type? :panes style :panes] foreach pane face/pane [examine :pane spaces] ][ examine :panes spaces ] remove/part spaces 4 ] examine face "" ] lo: layout [text-list] examine-lo lo -- Carl Read