r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[I'm new] Ask any question, and a helpful person will try to answer.

Henrik
13-Jan-2008
[983]
SteveT, using faces directly with MAKE is a lower level approach 
than LAYOUT. What LAYOUT does, is produce a face object that consists 
of many subfaces from your layout description written in the VID 
dialect. Each one of these face objects have settings for size, offset, 
appearance, text content, etc, which are set as the layout description 
is parsed. Using MAKE FACE directly provides greater control, but 
is more cumbersome to use, because you have to set all these values 
manually and arrange the face tree manually. You can see the content 
of the base FACE object in the console with:

>> ? face


The FACE object is the only object ever used, so it's a good idea 
to get to know it. You can extend it with more values and VID does 
this, to create variants, modes and extra operations on a face, like 
SET-FACE, GET-FACE, etc.


The reason why many choose to skip VID for this, is that VID doesn't 
provide the level of control needed as some things can't be determined 
properly at layout time, such as interdependency of sizes or offsets 
between faces, which is why VID doesn't support easy resizing out 
of the box.


Oh and when you get to try VID3 in REBOL3, forget everything I said, 
because it's a whole different system. :-)
SteveT
13-Jan-2008
[984x2]
Hi Henrik, thanks for that explanation.
main: layout [
        vh2 "Subpanel Examples"
        guide
        pad 20
        button "Panel 1" [panels/pane: panel1  show panels]
        button "Panel 2" [panels/pane: panel2  show panels]
        button "Quit" [quit]
        return
        box 2x140 maroon
        return
        panels: box 220x140 coal
    ]


Hi all, what does guide do above - I can't find it in the Dictionary
Henrik
13-Jan-2008
[986]
guide = "remember this cursor position"
SteveT
13-Jan-2008
[987]
Thanks again  Henrik
Henrik
13-Jan-2008
[988x2]
this means here, that it will affect how far to the left 'return 
will put the layout cursor
you can also use it like this:


view layout [button "hello" here: guide button "test" at here btn 
"boo!"]
SteveT
13-Jan-2008
[990]
Right so when you do return it will be kind of indented - Is it me 
or is guide not in the docs ???
Henrik
13-Jan-2008
[991]
it should be in the docs. which page are you reading?
SteveT
13-Jan-2008
[992]
I'm looking at the REBOL Dictionary
Henrik
13-Jan-2008
[993x3]
http://www.rebol.com/docs/view-system.html<--- for low level View, 
by the way
The dictionary doesn't contain dialected words, unfortunately
http://www.rebol.com/docs/easy-vid.html<-- this is an older, but 
fairly useful doc.
SteveT
13-Jan-2008
[996x2]
Yep - I read the View-System manual last night
what are dialected words ?
Henrik
13-Jan-2008
[998x3]
any words in a dialect
so you won't find BUTTON or GUIDE in the regular manual as they belong 
in the VID domain.
this is one of the major gripes about VID: I don't think there is 
one complete reference. Much of the information is either too old 
or dug up by probing inside SYSTEM/VIEW/VID to see what words are 
available in there.
SteveT
13-Jan-2008
[1001]
Oh! right and VID could be replaced by rebGUI or whatever
Henrik
13-Jan-2008
[1002]
yes, or your own dialect.
SteveT
13-Jan-2008
[1003]
Pennies dropped !! Thanks Henrik
Henrik
13-Jan-2008
[1004]
let me ask, do you know what a dialect is? If you know, then I think 
you know what I mean with language domains.
SteveT
13-Jan-2008
[1005x2]
Only form the context I've read in the introductory docs
from
Henrik
13-Jan-2008
[1007x2]
ok
Fun fact: VID was developed by Carl in about a week. It shows. :-)
SteveT
13-Jan-2008
[1009x2]
It may have it's faults! but when you've developed things with abstraction 
in mind your on the right footing to fix whatevers wrong
Your list-view for example - in hind-site you say it's big and bulk 
and could be done better - but the Grids and Tables that Microsoft 
and Java dish out can't come near to matching what yours provides 
out-of the-box
Henrik
13-Jan-2008
[1011]
I'm just glad that we'll be able to get rid of all the flaws with 
VID3. Tha's why I'm motivated for still teaching it.
SteveT
13-Jan-2008
[1012x2]
It's a great oportunity
I'm fortunate in that I can choose what I use and I wont be using 
anything else!  Just need to get up to speed ;-)
Henrik
13-Jan-2008
[1014]
I guess what LIST-VIEW can do the things it does, mostly because 
of how simple and flexible block operations are in REBOL. I've not 
worked much with C or JAVA, but arrays in PHP are a complete nightmare, 
requiring 20-30 lines of code with what you can do in REBOL in 1-2 
lines of code. My coding expertise has less to do with that, than 
the things REBOL enables you to do within that amount of code.

While it's only 110 kB of code, it's still a lot by REBOL standards. 
The entire of VID3 without the style library is smaller than this. 
The DevBase application is 50 kb. I'm sure that LIST-VIEW's successor 
can be half the current size, be faster and more flexible.
SteveT
13-Jan-2008
[1015]
I'm looking forward to using REBOL 3    If I buy the SDK now will 
that get me the SDK in REBOL 3 or will I have to buy it again ?? 
 (Not sure if it's a question for you!)
Henrik
13-Jan-2008
[1016]
Correct, it isn't a question for me. :-) I'd probably wait a bit 
until we have a clear statement on SDK issues from REBOL Technologies.
SteveT
13-Jan-2008
[1017]
Thanks, is it going to be say twelve months before I could do a commercial 
app text-list 's and all ?
Henrik
13-Jan-2008
[1018]
on the safe side, probably something like that. OTOH, maybe Gabriele 
will go crazy and have it ready in two weeks. :-)
SteveT
13-Jan-2008
[1019]
:-)
Henrik
13-Jan-2008
[1020]
there has been a tendency to give out some ridiculous time tables. 
Carl originally suggested R3 was to go beta by august 1st 2007. it 
didn't take long to see that it was unrealistic. so... if RT posts 
time tables, ignore them.
SteveT
13-Jan-2008
[1021]
Ok  lol
Brock
13-Jan-2008
[1022x2]
Steve, just additional comment on 'guide word.  Henrik stated this 
"this means here, that it will affect how far to the left 'return 
will put the layout cursor" which is not incorrect, but I believe 
it also remembers the top margin location as well. In the example 
you provided, without the 'guide where it is, the box should have 
lined up with the top of the "Subpanel Example".  However, it lines 
up where the guide was placed, under that text.
also, the 'return made a second 'column' in this case, thus we don't 
align with the guides left margin, only the top.
SteveT
13-Jan-2008
[1024x2]
Ok Brock - thanks, I've setup a pretty vanilla script and I'm just 
going to add these guide like things in and see what they do.
To convert some of my apps I may need some form  of 'anchor' facility
Brock
13-Jan-2008
[1026]
you can use any named element in a GUI and by using it's 'offset 
and some simple math you reposition your current position.  ie.  
  at field2/offset + 200x0.  This will reposition your current location 
at field2's offset plus 200 pixels to the right.
SteveT
13-Jan-2008
[1027]
Cool - thanks Brock
Gregg
13-Jan-2008
[1028x2]
GUIDE is also sensitive to the layout "direction", i.e., whether 
you're using ACROSS or BELOW. You can also manually remember locations.

	; some layout code
	here: at	; remember a postion
	; some layout code
	at here
	; some layout code
That's handy if you want to overlay a face direclty on another one.
SteveT
13-Jan-2008
[1030]
Right so as your building up your display you can 'return' to that 
point
Gregg
13-Jan-2008
[1031]
Correct.
SteveT
13-Jan-2008
[1032]
Perspectives of a newbie! By Steve Thornton (SteveT) 

Hi, it's that pesky newbie again!


I've been reading thru 'Rebol Programming for the Absolute Beginner'
by Nick Antonaccio.

It's a must read in my view (xcuse the pun)


I think anyone coming from a studio dev environment like me will 
find it very useful.

Regards
Steve