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

[REBOL] Re: New to list

From: antonr:iinet:au at: 11-Jun-2003 0:38

Hi John,
> It is amazing how much you know with so little documentation. > Where did you learn this? I would love to find this kind of information.
By trying and making my own styles over and again, I learned gradually. I also had to stare at some other people's code for a while before it began to make sense. I recommend to persevere.
> I've made the first two changes. Those were very easy to do. > > This one looks like a bit of reworking and I don't fully understand how > it functions. > > Anton wrote: > > >A way for the midpoint to suck in the in/outpoints, still using > the existing > >layout code is to do this: > > > >style midpoint box ... with [ > > pane: get in layout [ > > origin 0 > > space 0 > > box 6x40 font-size 11 feel [...] ; inpoint (pane/1) > > box 6x40 font-size 11 feel [...] ; outpoint (pane/2) > > ] 'pane > >] > > > >That steals the pane block from a new layout face (which is then > forgotten). > >The midpoint widget then takes that pane for itself. > > > >You will have to modify the feel code to be relative. > >ie. convert > > mp1/size/x -> face/parent-face > > op1/offset/x -> face/parent-face/pane/2 > > > I hate to seem dense, but my original code, modified to be relative > should replace the ". . ." in the three sections?
Yep, just move the code you had for each of your in/outpoints, but their feel code should be converted as I said above. I tried to show the main point of stealing the panes. Sorry for any confusion.
> Don't get me wrong, I appreciate your input very much. I just don't > like to make large changes without understanding why I am doing it. > Could you explain this somewhat? For example, I can find nothing on the > word "with" in any of the REBOL docs.
Well, it is mentioned, though briefly, just before section 7, in: http://www.rebol.com/docs/view-guide.html I probably picked it up from code examples more than the docs. I've got lots of examples of my own on rebsite "Anton": Determine rebsite "Anton" now and in the future with: select load-thru http://www.reboltech.com/index.r [folder "Anton"] ;== http://www.lexicon.net/anton/rebol/index.r Take your View desktop to the returned url, and navigate to the gui/ folder. There are some simple examples of new styles in there. Do this: probe face You can see a primordial face and its facets within. 'with is just the layout dialect's way of allowing you to easily set the facets of a face (or a style) you are building. These two examples are equivalent: layout [box "hello" red] layout [box with [text: "hello" color: red]] In the first example above, the string "hello" was placed in the block directly after 'box. The layout dialect sees that string and sets the box face's text facet to that string. The second example does the same thing more explicitly.
> Also I still have the problem of adding and removing these during > execution in such a way that I can individually address them. > If anyone knows how to do this, please enlighten me. > > Thanks again, > John
Anton Rolls.