Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Little questions, big answers...

From: ryanc:iesco-dms at: 4-Sep-2001 13:47

David Ness wrote:
> Although I have considerable experience across a wide range of programming > languages, REBOL is different enough that learning it is a challenge. So far > it has been a very productive and worthwhile challenge, but `hard' nonetheless. > > I have a few small fragments of code that > (a) work; and > (b) I don't understand at all (having cribbed them from some piece > or other of working code). I have the feeling that if I could gradually > understand them, I'd learn something about REBOL. > > Here's an example. I have > > dex-pane1: layout/offset [ > origin 0 space 2x0 across > styles dex-styles > label right "IP Address" 200x24 bold middle font-size 16 return > IP-1: fld right return > IP-2: fld right return > IP-3: fld right return > IP-4: fld right return > IP-5: fld right return > ] 0x0 > > which produces a panel in a display of IP addresses and Machine names. > > What I am unclear about is at least: > (1) what _are_ `IP-1' ... here inside the layout. Are they `objects' created > by this declaration?
The object is going to be there no matter what, it lives in the pane property. Assignment here just allows you to use that name to access it, like all assignments in rebol.
> (2) Is there some way I can `dump' `IP-n' to take a look at what they are;
Well I you can mark the fields in stylize (use user-data property I think, but you probably can add about any name). Then you can loop thru the panes to see which one is marked, dumping the value.
> (3) My display obviously is `wired' to display 5 addresses. How would one normally > generalize this.
Build your layout by hand. You can build it at the pane level, or just compose your own layout script on the fly.
> > Although detailed programming advice is always welcome, I am more looking for (a few) > words about what is really `going on' in something like this `layout' declaration, if > that can be answered in less than a long epistle.
>> source layout > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst 707-468-5400