rebol3

How do you start a Rebol3 GUI script without the console showing?

邮差的信 提交于 2020-01-05 09:49:06
问题 Currently I start a GUI from the console which involves first loading the GUI with load-gui and then run the script which shows the GUI. How can I start the GUI without a console showing? 回答1: You have to specify the open/exe action for the R3 script : the R3 exe. 来源: https://stackoverflow.com/questions/24717336/how-do-you-start-a-rebol3-gui-script-without-the-console-showing

REBOL 3 - How to update a layout that has already been viewed?

雨燕双飞 提交于 2020-01-04 02:46:06
问题 I'm trying to add a field to a layout after it has been viewed view/no-wait m: [field "hello"] insert tail m 'field insert tail m "hello" update-face m ** Script error: update-face does not allow block! for its face argument I want to update the whole layout, not just the field or some part of it. If I try to use view m , it opens a new window. Do I just have to un-view it and then view again? 回答1: You can use the LAYOUT function in R3-GUI as well. See the example below: view/no-wait m:

How do I pass a URL a cookie using Rebol 3?

ぃ、小莉子 提交于 2020-01-02 05:07:27
问题 Using R3, I need to get a localized version of a page from a website that uses cookies to handle this. In REBOL 2.x, I could do this: page: http://www.rci.com/resort-directory/resortDetails?resortCode=0450 read/custom page [header [Cookie: "USER_LOCALE=fr_FR"]] Based on the sketchy docs for R3, I should be able to do something like: result: write page [GET [Cookie: "USER_LOCALE"] {fr_FR}] Anyone have any ideas? The R2 method worked well, but since R2 doesn't handle UTF-8 needed for many

How to use IN with a block instead of an object?

天大地大妈咪最大 提交于 2019-12-30 10:34:41
问题 The IN function in Rebol finds out if a field is in an object: USAGE: IN object word DESCRIPTION: Returns the word or block in the object's context. IN is a native value. ARGUMENTS: object (any-object! block!) word -- (modified if series) (any-word! block! paren!) The claim is it works with objects or blocks. It works okay if I try it with an object: >> in object [foo: 10 bar: 20] 'foo == foo But if I just try it with a raw block, it gives back NONE: >> in [foo: 10 bar: 20] 'foo == none Guess

REBOL layout: How to create layout words automatically - word has no context?

时光毁灭记忆、已成空白 提交于 2019-12-23 08:37:14
问题 Using the REBOL/View 2.7.8 Core, I would like to prepare a view layout beforehand by automatically assigning words to various layout items, as in the following example. Instead of prepared-view: [across cb1: check label "Checkbox 1" cb2: check label "Checkbox 2" cb3: check label "Checkbox 3" cb4: check label "Checkbox 4" ] view layout prepared-view I would thus like the words cb1 thru cb5 to be created automatically, e.g.: prepared-view2: [ across ] for i 1 4 1 [ cbi: join "cb" i cbi: join

REBOL layout: How to create layout words automatically - word has no context?

自古美人都是妖i 提交于 2019-12-23 08:37:06
问题 Using the REBOL/View 2.7.8 Core, I would like to prepare a view layout beforehand by automatically assigning words to various layout items, as in the following example. Instead of prepared-view: [across cb1: check label "Checkbox 1" cb2: check label "Checkbox 2" cb3: check label "Checkbox 3" cb4: check label "Checkbox 4" ] view layout prepared-view I would thus like the words cb1 thru cb5 to be created automatically, e.g.: prepared-view2: [ across ] for i 1 4 1 [ cbi: join "cb" i cbi: join

Why are the 'context' and 'object' functions in Rebol different, but essentially the same?

五迷三道 提交于 2019-12-22 09:09:45
问题 On the one hand we have: >> source object object: make function! [[ "Defines a unique object." blk [block!] "Object words and values." ][ make object! append blk none ]] For context we see: >> source context context: make function! [[ "Defines a unique object." blk [block!] "Object words and values." ][ make object! blk ]] So, for object the object is constructed from a block to which none has been appended. This doesn't change the length, or, to my knowledge, add anything. With context , on

What is the 'reword' function in Rebol and how do I use it?

两盒软妹~` 提交于 2019-12-21 04:12:13
问题 I saw someone mention the reword function today, but documentation for it is very brief. It looks like shell script environment variable substitution, or maybe regex substitution, but different. How do I use this function and what kind of gotchas am I going to run into? 回答1: Here there be dragons! The reword function is a bit of an experiment to add shell-style string interpolation to Rebol in a way that works with the way we do things. Unlike a lot of Rebol's series functions, it really is

Why doesn't Rebol 3 honor quoted function parameters that are parenthesized?

最后都变了- 提交于 2019-12-17 18:46:37
问题 The DO dialect uses series of category PAREN! for precedence, and will usually boil away the underlying parentheses structure prior to invoking a function. However, it used to be possible in Rebol 2 to specify in a function's definition that you wanted it to suppress evaluation of parentheses at the callsite. You did this by using a "literal word" apostrophe mark on a parameter: evaluated: func [param] [probe param] non-evaluated: func ['param] [probe param] >> evaluated (1 + 2) 3 >> non

How are words bound within a Rebol module?

戏子无情 提交于 2019-12-17 18:17:41
问题 I understand that the module! type provides a better structure for protected namespaces than object! or the 'use function. How are words bound within the module—I notice some errors related to unbound words: REBOL [Type: 'module] set 'foo "Bar" Also, how does Rebol distinguish between a word local to the module ( 'foo ) and that of a system function ( 'set )? Minor update, shortly after: I see there's a switch that changes the method of binding: REBOL [Type: 'module Options: [isolate]] set