Hi Charles,
Yes, you found a craziness of the inbuilt list style.
The block directly in the subfunc body, referenced by the local
word stuff is indeed the only way to access the data.
[If you write clipboard:// mold system/view/vid/vid-styles/list,
you can see in the words dialect (search for "words:") that the
data keyword uses compose/deep to put the user data into the
block referenced by stuff. Totally crazy.]
The solution is to get mad and launch into writing your own list
style, firstly advertising its virtues, then defending its lack
of features during its development from the attacks of others
who feel let down by the marketing hype.
But to solve your immediate problem; if you have a list named
my-list:
layout [my-list: list 100x200 data [...]]
then, if not using a supply function, you can determine the list
block with this:
stuff: second second get in my-list 'subfunc
That gets the second item in the body of subfunc.
I can't remember an official doc of the all the built-in styles,
but there are definitely many examples by various people here.
Here's one of mine:
do
http://home.wilddsl.net.au/anton/rebol/gui/iterated/demo-vid-list-scroller.r
Regards,
Anton.
> That's great. It works. The problem is, I can't figure out where
> the data
> is being stored, how to access it, manipulate it, add on to it, etc. I
> printed out the contents, and the only place I could find the data was in
>
> >> subfunc: func [face count index /item /stuff][
> stuff: [[0 "="] [1 "+"]]
> either count > length? stuff [face/text: "" face/image: none] [
> set-it face stuff index count
> ]
> ]
>
> So, I don't get it. With most other types, you can access
> <object>/text or
> <object>/data. What's going on here?
>
> On a subnote, is there a doc elaborating on the pre-defined styles
> available?
>
> Again, my thanks to you all.
>
> --Charles
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.