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

[REBOL] Re: Anchor? - A newbie question

From: carl:cybercraft at: 16-Oct-2002 22:51

On 16-Oct-02, Jan Kmunicek wrote:
> Hi all Rebolers, > what I meant was following: I am actually trying > to transform my web to reb pages and I have there > several choice buttons. > main: layout [ > backdrop 128.128.128 > across > choice "TOPIC 1" "---------" "Topic 1 A" "Topic 1 B" > "Topic 1 C" "---------" "Back" > [do %t1.r] > choice "TOPIC 2" "---------" "Topic 2 A" "Topic 2 B" > "Topic 2 C" "---------" "Back" > [do %t2.r] > choice "TOPIC 3" "---------" "Topic 3 A" "Topic 3 B" > "Topic 3 C" "Topic 3 D" "Back" > [do %t3.r] > choice "TOPIC 4" "---------" "Topic 4 A" "Topic 4 B" > "Topic 4 C" "---------" "Back" > [do %t4.r] > choice "TOPIC 5" "---------" "Topic 5 A" "Topic 5 B" > "Topic 5 C" "---------" "Back" > [do %t5.r] > choice "TOPIC 6" "---------" "Topic 6 A" "Topic 6 B" > "Topic 6 C" "---------" "Back" > [do %t6.r] > return > . > . > . > . > I do not want to call for every subtopic a separate file > but rather to have all "A" subtopic in one file and jump to > a specific part only if this is possible. > Or is there any better and more straightforward solution? > Regards Smeagol
Hi Jan (Smeagol?:), You could use *do*'s args refinement to send your scripts the choice value. ie... view layout [ choice "A" "B" [do/args %test.r face/text] ] Then in your scripts grab the arguments supplied to them by looking at system/scripts/args. ie, if the following's... rebol [] switch system/script/args [ "A" [print "You chose A."] "B" [print "That was a B."] ] the %test.r script that selecting a choice in the above layout runs, it gives this kind of printout... That was a B. You chose A. You chose A. That was a B. You chose A. Hope that helps. -- Carl Read