[REBOL] Re: list: multiple columns update
From: rebol:optushome:au at: 15-Feb-2002 7:09
----- Original Message -----
From: "Robert M. Muench" <[robert--muench--robertmuench--de]>
To: <[rebol-list--rebol--com]>
Sent: Friday, February 15, 2002 3:58 AM
Subject: [REBOL] Re: list: multiple columns update
> > -----Original Message-----
> > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
> > Allen Kamp
> > Sent: Thursday, February 14, 2002 2:27 PM
> > To: [rebol-list--rebol--com]
> > Subject: [REBOL] Re: list: multiple columns update
>
> > Here is a simple multilist column example. Hope it helps.
>
> Hi, thanks. Yes it does but I have some questions
>
> > view layout [
> > style txt txt [if row [selected: row show lst]] 100
>
> What does the [...] block stand for in a style command? Is this the code
that
> gets executed if a row is clicked?
Yes. This is what gets executed when a face in the list gets clicked.
> You use 'row and 'row gets set to 'count within the supply block. So when
is the
> code in the style definition executed? IMO this can only happen after the
supply
> block has been exectued so that 'row has a valid value. On the other hand
you
> use the 'selected value with the 'if in the supply block... This indicates
that
> the code must be executed before the supply block so that 'selected has a
valid
> value.
Yes. I set 'row to 'count so that I can access that value outside of the
supply func, in this case I do it specifically so we can set 'selected to
the current row/count value when a face is clicked.
There is nothing list specific about using style, I am just using it as a
shortcut to provide the action block to all the columns by creating a style
with that as its action.
I don't have time to check your code now, but will have a look when I get
home. But I suspect that you understand how to fix it now.
Cheers,
Allen