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: 1-Jul-2002 18:16

Hi again, Just realised that it's the text-list that's causing the error. Replacing the text-lists with areas in the much bigger layout I'd been having the problems with allowed the script to look all through it. So, I've narrowed the error down to 'face being a function sometimes, but while this... print type? :face gets round it for a word, I don't know how to do that for a function in an object. ie, this doesn't work...... print type? :face/pane pane still being evaluated. So, what's the solution to that? Carl. On 01-Jul-02, Carl Read wrote:
> Hi all, > I've been trying to write a script to examine layouts, but I always > get an error. Here's an example of the problem... > REBOL [] > examine: func [face][ > print type? face > if not object? face [exit] > print type? face/pane > either block? face/pane [ > foreach pane face/pane [examine pane] > ][ > examine face/pane > ] > ] > lo: layout [text-list] > examine lo > And this is the output I get from it... > object > block > object > object > object > block > object > ** Script Error: Cannot use subtract on block! value > ** Where: pane > ** Near: iter/offset: iter/old-offset: id - 1 > I'm totally stumped! Any ideas for what's wrong?
-- Carl Read