开发者

Is there a help system for REBOL/View?

As a REBOL newbie, I'm really finding the HELP command useful, and I've found a lot of great documentation online. That's really not so true for REBOL/View, though. The REBOL/View VID Develop开发者_运维百科er's Guide is good, but not easy to find answers in.

For example: It took a while, but I figured out how to put information in a text-list by setting its DATA to a block. Now, when the user selects something from the text-list, I'd like to know what was selected. My best estimate is that it will take me one or two hours to figure that out.

Is there any correlate of HELP for REBOL/View? Or just anyplace I can find a list of the values I can get or set for each style?


All the documentation is on http://www.rebol.com/docs/docs.html page, see "Graphical Programming" section for View. Unfortunately View documentation is not that complete.

I usually use this method:

view layout [t: text-list data ["a" "b" "c"] [? t]]

When you click on the text-list, all its properties will be printed out on console. So you can easily find what you need.

In this example, you can see there is a "picked" property,

view layout [t: text-list data ["a" "b" "c"] [? t/picked]]
>> T/PICKED is a block of value: ["b"]
>> T/PICKED is a block of value: ["b" "c"] ;multiple select using ctrl

So you need to pick the first item in the list:

view layout [t: text-list data ["a" "b" "c"] [print first t/picked]]

You also check the document http://www.rebol.com/how-to/fields.html

view layout [
    text-list "Red" "Forest" "Blue" "Gold" "Teal" [
        f-color/text: copy value
        f-color/font/color: get load value
        show f-color
    ]
    f-color: field "Pick a color"
]


The doc on View is correct for basics (see http://reboltutorial.com/bookmarks/rebolvidtutorial). But it's very difficult to go beyond that because there are no ADVANCED documentation with samples. So I rarely use VID though I'd like to.


the main page for the view system is: http://www.rebol.com/docs/view-system.html it links to all the other reference guides related to vid/view.

it took me a while to find it so I bookmarked it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜