*: :multiply, for example, seems to be harmless.
Red [needs: 'view] view [ f1: field button "Evaluate" [ view [text f1/text] ] button "Quit" [quit] ]
produces this error message:
Script Error: VID - invalid syntax at: [f1/text] Where: do
Stack: view do-events do-actor do-safe view layout cause-error Script Error: head does not allow none! for its series argument
Where: head Stack: view do-events do-actor do-safe error? do-actor do-safe eval-set-path
Whereas this works:
Red [needs: 'view] view [ f1: field button "Evaluate" [ x: f1/text view [text x] ] button "Quit" [quit] ]
I am using red-25oct18-12ad56be.exe.
loading 40MB might not work on Red yet. If it is not mandatory to
view [base draw [b: box 2x2 3x3 ] on-up [b/2: b/2 + 1]]but they uses
view [base draw [box 2x2 3x3 ] on-up [face/draw/2: face/draw/2 + 1]]). Is there a reason for this?
b1: box pos-start: 2x2 pos-end: 3x3is not possible). They disallow this because it's just easier to parse (draw) or is there another reason?
hello! is there an equivalent for the Rebol dt function in Red? I'm trying to load a 40MB file that contains a block! without success. I would like to graph the loading time for a sample of files of different size to understand the limits of the Red loader. thank you!
Does it load with Rebol2?
If yes, how much memory does it use in Rebol?
Could you provide us with a copy of that file for testing?
:point_up: 26 października 2018 23:29
They are making "library system".
@toomasv I see, thank you.
Pardon me, I have not understood whatg you are comminicatingoto me.
@GiuseppeChillemi just use
#includefor now, and don't sweat it. If you have hard numbers about it being too slow, we can look at the exact use case and make better suggestions.
I will use "DO" but, why are you discarding "load" from your suggestion ?
face/draw/...? I guess when you are changing whole draw block:
view [base draw [d:] on-down [face/draw: reduce ['ellipse event/offset 3x3]]]but you can achieve it with
view [base draw [d:] on-down [clear d append d reduce ['ellipse event/offset 3x3]]].
1) Selection in two areas:
view [ a1: area "Some text" a2: area "Other text" button [ a1/selected: 1x4 a2/selected: 1x5 ] ]
2) Cursor position:
view [ a1: area "Some text" a2: area "Other text" button [ a1/selected: 6x5 a2/selected: 7x6 ] ]
Push button, then click either area. Cursor shoud be on the beginning of second word.
3) Centering appended text: I think it is possible, but don't have time now to experiment with it. I just did something lik it with rich-text-box though.
It involves counting lines and skipping around in area's text. First steps:
view [ a1: area "Some^/text^/more" below button "Head" [a1/text: head a1/text] button "Tail" [a1/text: find/last/tail a1/text "^/"] ]
More on double selection:
sel: func [f t][ as-pair i: index? find f/text t i - 1 + length? t ] view [ a1: area "Some text other" a2: area "Other text some" below fld: field "text" button "Select" [ foreach a reduce [a1 a2][ a/selected: sel a fld/text ]]]
Try to change word and "Select".