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

layout question

 [1/9] from: cavallieri::carlo::gmail::com at: 25-Nov-2005 15:19


First: Hi All Second: these are my first step on the REBOL world, so consider me a newbie. In my "way to understand REBOL" i've tried to see what actually "layout" does, so i type "source layout" and there are some line of code that i've not understand: new-face: make any [ all [parent object? new new] all [parent word? new get-style new] vid-face ] so, it basically try to set "new-face" to the parent or parent style if a /parent is used right? why i need to type "new new" ? What is "vid-face", where is defined? -- Carlo

 [2/9] from: volker:nitsch:gmai:l at: 25-Nov-2005 15:32


On 11/25/05, Cavva <cavallieri.carlo-gmail.com> wrote:
> First: Hi All > Second:
<<quoted lines omitted: 11>>
> if a /parent is used right? > why i need to type "new new" ?
all [(parent) (object? new) (new)]
> What is "vid-face", where is defined? >
probe first system/view/vid
> -- Carlo > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

 [3/9] from: lmecir:mbox:vol:cz at: 25-Nov-2005 15:38


Cavva napsal(a):
>First: Hi All >Second:
<<quoted lines omitted: 11>>
>if a /parent is used right? >why i need to type "new new" ?
this is hardly "new new". I think, that you need to know how ALL works. Here is what is the meaning of all [parent object? new new]: 1) it checks PARENT. 2) If true, it checks, whether NEW is and object. 3) If true, it yields NEW as result. A more understandable way of doing it might be: new-face: make case [ all [parent object? new] [new] all [parent word? new] [get-style new] true [vid-face] ]

 [4/9] from: cavallieri:carlo::gmail at: 25-Nov-2005 15:47


new new understood, thanks So, "vid-face" is a local variable defined in "system/view/vid" right? but i still don't understand why i can symply refer to "vid-face" without saying that is under "system/view/vid" if in the console i type "vid-face" i get an error .. --Carlo 2005/11/25, Ladislav Mecir <lmecir-mbox.vol.cz>:

 [5/9] from: lmecir:mbox:vol:cz at: 25-Nov-2005 16:16


Cavva napsal(a):
>"new new" understood, thanks > >So, "vid-face" is a local variable defined in "system/view/vid" right? > >but i still don't understand why i can symply refer to "vid-face" >without saying that is under "system/view/vid" > >if in the console i type "vid-face" i get an error .. > >--Carlo >
Check this: my-object: make object! [ a: 112233 set 'f func [] [a] ] now if you do: f ; == 112233 , but A is local to my-object

 [6/9] from: cavallieri::carlo::gmail::com at: 25-Nov-2005 16:42


Ok, but with " set 'f " you "expose" f in the global context, tell me if i'm wrong, so now i can type "f" at the cosole because "f" is now a "global function" ... but "vid-face" is different, i think only "layout" or "view" (console don't) can see it but i don't understand why, nor with "source view" or "source layout" i can see something refer to system/view/vid/vid-face ... so i'm still looking in the "wrong place" but were's the right one ? 2005/11/25, Ladislav Mecir <lmecir-mbox.vol.cz>:

 [7/9] from: volker:nitsch:gm:ail at: 25-Nov-2005 18:11


On 11/25/05, Cavva <cavallieri.carlo-gmail.com> wrote:
> Ok, but with " set 'f " you "expose" f in the global context, tell me > if i'm wrong, > so now i can type "f" at the cosole because "f" is now a "global function > ...
Right. You are close. :)
> but
vid-face" is different, i think only "layout" or "view" (console don't
> ) > can see it but i don't understand why,
Look at the "a" in ladislavs example!
> nor with "source view" or "source layout" i can see something refer to > "system/view/vid/vid-face" ...
<<quoted lines omitted: 36>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

 [8/9] from: cyphre:seznam:cz at: 25-Nov-2005 18:30


----- Original Message ----- From: "Cavva" <cavallieri.carlo-gmail.com> To: <rebolist-rebol.com> Sent: Friday, November 25, 2005 4:42 PM Subject: [REBOL] Re: layout question
> Ok, but with " set 'f " you "expose" f in the global context, tell me > if i'm wrong, > so now i can type "f" at the cosole because "f" is now a "global function" > ... >
right
> but "vid-face" is different, i think only "layout" or "view" (console
don't
> ) > can see it but i don't understand why, > > nor with "source view" or "source layout" i can see something refer to > "system/view/vid/vid-face" ... > so i'm still looking in the "wrong place" but were's the right one ? >
You can't see it from "source view" or "source layout" because the SYSTEM object(and all its content) is already loaded(and properly bind) in Rebol interpreter during the 'startup sequence'(before you are able to use and access it). You can see this only if you have Rebol SDK sources. There is something like: system/view/vid: context [ ..... ..... ..... vid-face: make face [ .... ] set 'layout func [...][ ... ] ... ... ] ;end of system/view/vid So from this you can see that the LAYOUT function is defined as global when it is 'loaded' in the SYSTEM/VIEW/VID context. regards, Cyphre

 [9/9] from: cavallieri::carlo::gmail::com at: 25-Nov-2005 19:14


ahhh.. the light! i can see the light!! :) thanks Cyphre, and also Volker and Ladislav 2005/11/25, Cyphre <cyphre-seznam.cz>:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted