Questions tagged [rebol2]

REBOL (Relative Expression Based Object Language) is a cross-platform data exchange and multi-paradigm dynamic programming language designed by Carl Sassenrath, for network communications and distributed computing. The language and its official implementation are developed by REBOL Technologies.

101 questions
1
vote
1 answer

How to assign function to Rebol struct member

I first define a function ADD: add: func [ a [integer!] b [integer!] ] [a + b] Then a struct: s: make struct! [ sadd [ function! ] ] add But Rebol struct does not support the FUNCTION! datatype. How can I assign a function to a Rebol struct?
1
vote
3 answers

Rounding TIME! to a number of days in Rebol

I've found one way to turn a TIME! in Rebol into a number of days: add it to a date and then subtract that same date. >> dummy-date: 12-Dec-2012 == 12-Dec-2012 >> (dummy-date + 44835:11:58) - dummy-date == 1868 That's...rather awkward. Is there a…
1
vote
1 answer

How are 'bind' and 'in' different?

Take the following code which creates a context: c: context [a: 2] You can see it creates a context c, and that a is not bound in the global context: >> ?? c c: make object! [ a: 2 ] >> a ** Script Error: a has no value ** Near: a Now if you…
Geeky I
  • 751
  • 6
  • 22
1
vote
1 answer

Rebol shift-tab side effects

Given this: view layout [ field [print "1" ] field [print "2"] ] When I shift+tab from field #2 to field #1, no actions are fired. How do I get them to fire just like a normal tab?
dogeye
  • 177
  • 6
1
vote
1 answer

Documentation for Rebol2's read/custom?

I've been trying to update Ross-Gill's Twitter API for REBOL2 to support uploading media. From looking at its source, the REBOL cookbook, the codeconscious site, and other questions here, my understanding is that read/custom is the preferred way to…
Tectorum
  • 13
  • 3
1
vote
0 answers

Detecting right clicks in Rebol

view layout [ box red feel [ engage: func [face action event] [ if action = 'alt-down [print "alt down"] ; 1 if event/double-click [print "double-click"] ; 2 ] ] ] This code doesn't detect double right clicks. When I quickly…
Darek Nędza
  • 1,420
  • 1
  • 12
  • 19
1
vote
1 answer

How can I get Rebol2 View running on Arch Linux?

There is a 64-bit version of Rebol2/Core available, but not of /View. If I try to execute the binary, it just says the file does not exist. What 32-bit libs do I need to install to get things running on Arch?
James Irwin
  • 1,171
  • 8
  • 21
1
vote
1 answer

Parse issue when using Change command (Rebol2)

I have the following parse issue. In the first sample text below, the parse will hit the two command blocks as it finds the parts in the text. Give the below a try (Rebol 2). sample-text: {
Brock
  • 33
  • 8
1
vote
1 answer

How to start a forever loop while keep processing events in Rebol

I'd like to set up a web server in my app which requires a forever loop. The waits in the loop allow the GUI to keep processing interface events. But if I start the loop, then I can't exit from it to start the GUI. And if I'm in the GUI already,…
HappySpoon
  • 233
  • 2
  • 8
1
vote
2 answers

How to remove rebol script security level prompts

I'd like to remove the prompt when using load/library 1) From the Crimson Editor I tried to load the script using -s secure allow arguments with no effect 2) within the script secure [ library allow ] gives me another prompt "script requests…
OneArb
  • 453
  • 2
  • 14
1
vote
1 answer

How to properly initialize a pointer to a double value within a struct?

I'm trying to get a pointer to a double value within a struct that I can pass to a routine, but having trouble getting any value other than 0. The following has worked for other struct! values I've used (such as one containing only binary!), but…
kealist
  • 1,669
  • 12
  • 26
1
vote
3 answers

How do you use the output from `info?` in a conditional?

Given the following code: file-info: info? %my_file.txt How do you compare file-info/type in a conditional like: if file-info/type = "directory" [ ... ]
Darrell Brogdon
  • 6,843
  • 9
  • 47
  • 62
1
vote
2 answers

How to "unmold" a string?

I'm using this library to convert a block to a CSV. However, when it encounters a string with a comma in it it molds that string. Normally not a problem except that the curly-braces seem to confuse Excel. So, {This, is a test} gets turned into |…
Darrell Brogdon
  • 6,843
  • 9
  • 47
  • 62
1
vote
2 answers

How to execute a Rebol CGI script on apache2

I'm trying to run a Rebol CGI script, on an apache2 server running on a GNU/Linux Debian Stable machine. Here is my Rebol script: # pierre@autan: ~$ < 2013_05_29__17_35_22 > dog /usr/lib/cgi-bin/test.cgi #!/usr/bin/rebol -cs REBOL [] print…
Pierre
  • 530
  • 5
  • 13
1
vote
4 answers

How to cope with Rebol events when the layout is built programmatically?

I know how to build a pictures gallery dynamically, how do I now allow to trigger an event when the user clicks on a picture ? I don't want to have the engage function inside the layout but outside: is it possible ? Not sure I am clear so tell me.
Rebol Tutorial
  • 2,738
  • 2
  • 25
  • 36