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

[REBOL] Re: R: Dynamic Layout creation

From: carl:cybercraft at: 16-Mar-2002 15:02

On 16-Mar-02, Alessandro Manotti wrote:
> furthermore, about my previous question, I "discovered" another > thing: if I type, from console: >>> A: "b1: button {prova}" > == "b1: button {prova}" > then: >>> la: to-block a > == [b1: button "prova"] > now if I try to make a layout: >>> view layout la > ** Script Error: b1 is not defined in this context > ** Where: forever > ** Near: set :var new new/var: to-word > but if I directly type the block (not write in string then convert): >>> lb: [b1: button "prova"] > == [b1: button "prova"] >>> view layout lb > It works! WHY?! "la" and "lb" seem the same! where is the > difference? where is my mistake?
Hi Alessandro, I know a solution to making 'la work. Try... view layout load la But I'll leave it up to someone else to explain why 'load makes it work. I assume it's something to do with "Binds words to global context." as mentioned with 'load's help...
>> ? load
USAGE: LOAD source /header /next /library /markup /all DESCRIPTION: Loads a file, URL, or string. Binds words to global context. LOAD is a native value. And don't worry - I scratched my head over the first time I saw 'load used like this as well. (: -- Carl Read