rebol

Why local variable is not respected ?

In this code snippet fields-types in the end is modified by to-camel-case function whereas it was passed as a local variable to the parent function: fields-types: ["First Name" "string" "Last Name" "string" "Age" "int"] to-camel-case: funct[name][ name/1: lowercase name/1 replace/all name " " "" ] fill-template-body: func[fiel...

Problem with context and property

Let's say I want to generate this output: public String toString() { return this.getFirstName() + "," + this.getLastName() + "," + this.getAge(); } from the template below and a custom recursive build-markup function: template-toString: {this.get<%property%>() <%either not context.build-markup/EOB [{+ "," +}][""]%> } ...

Trigger close event for Rebol Console ?

How to trigger close event for Rebol Console to execute some custom handler before one quit the console ? ...

Rebol anonymous function behavior is weird

My anonymous func test below is executed only once: repeat i 5 [ func[test][ print test ] rejoin ["test" i] ] I am obliged to name it to be able to execute it 5 times as expected: repeat i 5 [ test: func[test][ print test ] test rejoin ["test" i] ] This is weird. isn't it really possible to use anonymous function in...

How to create a clickable link in rebol VID ?

Let's say I want to create a twitter client which list tweets. How would I create and detect a clickable link within a text zone ? Update: I mean in rebol VID ...

Rebol and oAuth: how to ?

There are a bunch of samples in other programming languages but none for rebol. How would I do the equivalent of this C# sample: http://www.codingthewheel.com/archives/codingthetweet or this in php http://www.snipe.net/2009/07/writing-your-first-twitter-application-with-oauth/ ...

Rebol url format bug

Cannot read http://www.earnforex.com/blog/2010/08/forex-technical-analysis-for-week-0809%E2%80%940813/ how to encode the url to be able to read it with rebol ? ...

rebol parse problem

simple parse example: ab: charset "ab" parse "aaa" [some ab] ; == true if i wanted one-liner (define ab in place), how do i do it? parse "aaa" [some [charset "ab"]] ; ** Script Error: Invalid argument: ?function? parse "aaa" [some (charset "ab")] ; (INTERPRETER HANGS UP) i use REBOL 2.7.7.4.2 UPDATE in rebol 3: parse "aaa" [s...

Programming a sandbox environment in rebol a bit like spoon.net

http://spoon.net let's you execute desktop application by downloading them from the web. When you quit it restores the system. On http://askpoweruser.com I'd like to do the same thing. My idea would be to persist the whole system hierarchy on disk and then restore it at the end of execution. Is a single line of code would be enough (se...

Can rebol parse function be able to create rules for parsing css2 / css3 fully ?

Are there limitation to rebol parse function power ? Would it be capable of parsing the whole css2 / css 3 spec or will it encounter theorical impossibility to form some rules ? Update after HostileFork answer: I mean in regexp I think it would be rather impossible, is parse much more powerfull ? If yes does it mean it would be possibl...

problem with rebol vid panel and offset 0x0

This doesn't work panel1.layout: layout [ offset: 0x0 yuml-image: image img ] panel2.layout: layout [ offset: 0x0 area (yuml-command0) yellow ] panelbuttons.layout: layout [ button "Save" [request-save] button "Refresh" [request-refresh] button "Quit" [quit] ] Main: layout [ panel1: box 640x300 white return ...

Will Rebol 3 support SetWindowsHookEx

I asked the question "Will Rebol 3 extension support any windows api call including those requiring callback ?". Now to be sure and to take an example, will it possible to use Win 32 SetWindowsHookEx() and do screen capture like this: http://www.codeproject.com/KB/cpp/Screen_Capture_Win32.aspx Rebol is really missing screen capture fu...

How to control the space between boxes in rebol draw ?

Question update: I'm almost there, just missing dotted line style for the grid. grid: [1100 600] step-grid: 5 max-n-points: grid/1 / step-grid x-axis-border: 20 Y-margin: 10 max-random: 1000 n-points: 300 get-random-data: func[n p][ block: copy [] repeat i n [ append block RANDOM p ] block ] get-extremes: func[block][ ...

How to create interactive chart with Rebol

I have this code to create a candlestick chart in rebol. Now I'd like to use over feel http://www.rebol.com/how-to/feel.html#section-6 to show info on each candlestick but my box is drawn with draw dialect and it doesn't seem to accept event ? plot: [ pen green line 5x404 5x440 pen gold fill-pen 0.255.0 box 3x424 7x418 line 10x396 1...

Why Rebol engage doesn't work ?

I have added keyboard event but none is detected why ? plot: [ pen green line 5x404 5x440 pen gold fill-pen 0.255.0 box 3x424 7x418 line 10x396 10x422 pen gold fill-pen 0.255.0 box 8x418 12x402 line 15x397 15x436 pen gold fill-pen 255.0.0 box 13x401 17x435 line 20x429 20x447 pen gold fill-pen 255.0.0 box 18x434 22x446 line 25x441 25...

How to create a panel on the right side of the layout for drawing a chart y-axis ?

I can't see how to position a new panel4 across panel1, panel2, panel3 on the right side for drawing my y-axis: plot: [ pen green line 5x404 5x440 pen gold fill-pen 0.255.0 box 3x424 7x418 line 10x396 10x422 pen gold fill-pen 0.255.0 box 8x418 12x402 line 15x397 15x436 pen gold fill-pen 255.0.0 box 13x401 17x435 line 20x429 20x447...

How do I refer to variable in func argument when same is used in foreach

How can I refer to date as argument in f within the foreach loop if date is also used as block element var ? Am I obliged to rename my date var ? f: func[data [block!] date [date!]][ foreach [date o h l c v] data [ ] ] ...

Other options for a Rebol editor|IDE?

I currently use Programmer's Notepad with the Rebol syntax scheme. It's not bad--does any insightful person have another suggestion? ...