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

[REBOL] "Launch" bug ?

From: athymik::ifrance::com at: 24-Nov-2002 17:28

Hello everybody, Here is my (long) problem : When I try to use "reboot" function in my scripts, I get this error : ** Script Error: launch has no refinement called quit ** Where: reboot ** Near: launch/quit ""
>>
I found it a bit surprising... and when I try to get some help with "help launch" I get : 8<---------------------------------------------------- USAGE: LAUNCH arg /secure-cmd DESCRIPTION: (undocumented) ARGUMENTS: arg -- (Type: any) REFINEMENTS: /secure-cmd 8<---------------------------------------------------- Now, I was *very* surprised to see a system function, "reboot", trying to use a refinement that doesn't exist, and I first thought it was a bug. But I restarted rebol, and I tried to get some more help at the command line : 8<----------------------------------------------------
>> help launch
USAGE: LAUNCH value /reboot /uninstall /link url /quit /secure-cmd DESCRIPTION: Launches a new REBOL interpreter process. LAUNCH is a native value. ARGUMENTS: value -- The command-line arguments (Type: any-string) REFINEMENTS: /reboot /uninstall /link url -- (Type: any) /quit /secure-cmd 8<---------------------------------------------------- I think Rebol overwrites the launch function before executing a script. So I "traced it" (i'm sorry, english is not my mother tongue and i don't know the good word) with "rebol -t" : 8<---------------------------------------------------- Trace: if (word) Trace: system/options/script (path) Trace: [ unprotect 'launch launch: func [arg /secure-cmd] [alert "Launch can only be used by launcher programs."] if all [link? system/options/link-url] [connect-to-link] if do-boot system/options/script system/script/args none [ if all [link? system/options/link-url] [ link-init-done forever [ wait none link-sweep-app ] ] quit ] either view? [ alert reform ["Cannot run script:" system/options/script] quit ] [ print [system/options/script "could not be evaluated."] ] ] (block) Trace: unprotect (word) Trace: 'launch (lit-word) Result: (unset) Trace: launch: (set-word) Trace: func (word) Trace: [arg /secure-cmd] (block) Trace: [alert "Launch can only be used by launcher programs."] (block) 8<---------------------------------------------------- Hmm... Why does Rebol overwrite this function ? Thanks a lot, Regards, Athymik. _____________________________________________ A few weeks ago, I discovered Rebol, A few weeks ago, I discovered a wonder.