World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
Henrik 16-May-2009 [2633x4] | VID (and slider) is not very well documented. |
If you do: ? face you'll see that a face is a simple object. If you do something like: f: make face [] view f It'll display a gray area in the upper left corner of your screen. View simply takes that object and converts it into graphics. | |
With the above example, you are using View alone without VID. | |
That's about as fundamental you can get. Now, a more complex layout consists of many faces and this works by grouping them in a tree of objects. In the FACE object, there is an entry called PARENT-FACE, which is how faces are grouped together in a tree. PARENT-FACE can be another face object or a block of face objects. This is fundamentally how a typical View layout works, and you can build a layout like this by hand, by creating each face, setting position and size, color, text, etc. for each face, and put them together in a tree and display them with View. | |
mhinson 16-May-2009 [2637] | I see the grey square... and I probed f too to see how the object is made.. |
Henrik 16-May-2009 [2638] | I'm sure you can now figure out, that if you did something like: f: make face [offset: 100x100 size: 200x200] You can figure out what happens. :-) |
mhinson 16-May-2009 [2639x3] | I can guess, but I need to know how to know for sure. |
I think I can work it out | |
? f shows offest & ? f/offset shows F/OFFSET is a pair of value: 479x202 I guess that is as much as I can find out about offset? | |
Henrik 16-May-2009 [2642] | yes, offset is just a pair which positions the upper left corner of the face. nothing else. |
mhinson 16-May-2009 [2643] | so I suppose the slider must have some exposed face I could find if I keep hunting |
Henrik 16-May-2009 [2644x2] | it's jumping a little far, but essentially the face tree I talked about is where the slider would be. |
if you make a layout with VID, a set-word! would allow you to reference a single face: view layout [ button field s: slider ] escape to console ? s brings up the slider face. | |
mhinson 16-May-2009 [2646x2] | is there a list of documented featurs so I can try to avoid using the undocumented ones like Slider please? |
Or is the graphics stuff really an experimental addon? | |
Henrik 16-May-2009 [2648] | It's not experimental, but just not very well documented. I suggest you try the VID style tree in the REBOL desktop under REBOL/REBOL Tools. |
mhinson 16-May-2009 [2649] | It dosnt work. it just says missing file http://www.codeconscious.com/rebsite/vid-ancestry.r |
Henrik 16-May-2009 [2650x2] | It works fine here in REBOL/View 2.7.6. |
are you connected in the lower left corner? | |
mhinson 16-May-2009 [2652x2] | REBOL/View 2.7.6.3.1 |
it says local. | |
Henrik 16-May-2009 [2654x2] | Click the "local" text and it will connect and allow you to download the script. |
In that script you can see the style tree, all styles available in VID. Click on the style will give you the source code for that style. | |
mhinson 16-May-2009 [2656] | That is very good... I was wondering if there was a tree type view of some of the functions in Rebol. |
Henrik 16-May-2009 [2657] | After this, probably go to Demos and Easy VID, for a simple VID tutorial (unfortunately it was never completed, but it has good parts) |
mhinson 16-May-2009 [2658x2] | Thanks for your help again :-) I can see I could spend hours looking at the tree view alone... I had a quick look at the view top when I first instaleld it, but it was all too advance for me then, and then I forgot that it existed. |
I have studied all the information about VID that I can find, for 2 hours mostly trying to find out how to use a slider that is shown horizontaly, rather than verticaly but I cant find where this is described. Have deliberatly not asked how I do this because I want to learn how to find the answers to these sorts of questions myself.. Without telling me the answer directly, can anyone suggest how I should learn to find this information for myself please? | |
Maxim 16-May-2009 [2660x7] | there is another VID base doc, simpler, might help you start. http://www.rebol.com/docs/view-guide.html honestly, I literaly learned all of the VID tricks my doing this: |
probe face | |
where face is any face you have setup in a layout. | |
ex: layout [ my-btn: btn "ok" ] probe my-btn | |
I still use this quite often. | |
I'd say learning to build new styles with the stylesheet system is the first big boost in productivity. this will inevitably leed to you wondering how you can change this or that, and then by probing the face and looking at its code, you see that some values are being reset in the event handler... which is quite annoying. the seconf big boost is to try and understand the event system. the view reference link that henrik gave you earlier is the best resource online. | |
and rebol, as a language is extremely easy to search on the net... you start any search on google with the word REBOL and you'll end up with mailing list chats, altme pages, scripts on rebol.org, etc. | |
mhinson 16-May-2009 [2667] | It seems too complex to get started... the examples seem to jump from childishly simple, right to very hard, with no middle ground. |
Maxim 16-May-2009 [2668x2] | did you look at the view guide? |
(not the reference) | |
mhinson 16-May-2009 [2670] | which one was that? I am confused by so many sources of information. |
Maxim 16-May-2009 [2671x2] | http://www.rebol.com/docs/view-guide.html |
this is simple, with gfx and goes over everything, just to get you going... Its the only docs we had for years! | |
Henrik 16-May-2009 [2673] | slider is sensitive to its size. if you give it a horizontal size bigger than vertical, it goes horizontal. |
mhinson 16-May-2009 [2674x2] | It does look well written, I remeber now I started reading this & one of the first questions I had was about Slider & since there is hardly any mention of it I started looking for other sources that I thought might be more complete.... Since you have recomended it I will read it from end to end & see if I am just too stupid to learn :-) |
Henrik. thanks for that, I chalange you to find it documented anywhere.... (apart from the code its self) | |
Henrik 16-May-2009 [2676x2] | mhinson, I looked the hard way: through the source code for slider. :-) |
This is of course not the way it's meant to be. Unfortunately VID development stopped a long time ago, but there are alternatives, like RebGUI and GLayout. All energy is now focused on bringing an incredibly improved and highly well documented VID to REBOL 3. | |
mhinson 16-May-2009 [2678] | I need to learn that trick in time as I think it is the only way to find out a lot of things. It can feel frustrating to know what is likely to be possiable, but to spend hours trying to work out the very first step. |
Henrik 16-May-2009 [2679] | I spent a couple of years figuring out the FEEL concept, so you're not alone. |
Brock 16-May-2009 [2680] | Yes, one thing we really need in the Rebol world is for someone to site down and create a full example set of what is possible with what we have. I too am pretty weak with VID and View, but it's been something I think about every time I see a new Javascript library with lots of examples available. |
mhinson 16-May-2009 [2681] | Documetation is very hard, because the people who need it most dont know enough to write it, & the people who can write it dont need it so must struggle to know what is going to be most helpfull. |
Brock 16-May-2009 [2682] | mhinson. To give you some perspective. Carl never intended VID to be the end-all-be-all graphic system. He said he built it over a couple of days and expected someone to use that as motivation to either build their own or enhance what was started. Ashley Trutter created RebGUI, which is more complete that VID. He also received awards at Rebol DevCon's for his efforts. |
older newer | first last |