[REBOL] Re: Iterated check box anomaly (resend) - now, the ROTARY!
From: geza67::freestart::hu at: 5-May-2002 21:48
Hello Anton,
> Don't listen to that negative stuff.
> Here seems to be a solution. Tell me if it works.
Thank you, it really works! But ... :-)) Now I am stuck with a more
complex structure, namely the rotary.
I tried several initialization strategies, some of them even did not
let to "rotate" the rotary, i.e. it stayed the same.
The model below characterizes best my wishes: I store the state (the
'index? of 'data list) of the rotary in a global context list, where
the n-th cell will be set to 'index? In the scenario n is the row
count of the list, thus the 'count word of the 'supply function.
rebol[]
c: ["1" "2" "3" "4"]
l: ["first" "second" "third" "fourth"]
view layout [
list 600x400 [
across
cnt: info "1"
answer: rotary 240 [
poke a to-integer cnt/text index? answer/data
] data copy head l
] supply [
if count > length? l [face/show?: false exit]
face/show?: true
switch index [
1 [
face/text: pick c count
]
2 [
face/text: probe pick l a/:count
]
]
]
do [a: [1 1 1 1]]
]
Unfortunately, the code - the intention, to set the
variables in the action block of the rotary and restore their state in
the supply function, is not working.
It seems that answer/data is common among ALL list rows - clicking on
any row will advance the common 'data list to the next slot, thus
answer/data is not individual(separate) amongst the list rows.
Some ideas? Or is the rotary a non-iterable item as Brett pointed out
regarding text fields?
I would be grateful to the elaboration of this list-theme :-)
--
Geza mailto:[geza67--freestart--hu]