[ALLY] Re: more weird behavior..
[1/5] from: larry:ecotope at: 15-Nov-2000 11:24
Hi PeO
Try this:
>> view layout [t1: text 100x200 text_1 as-is]
Notice the keyword AS-IS. Also you don't really need the WITH because layout
will assign anything that evaluates to a string as the string to be
displayed in the text element.
HTH
-Larry
[2/5] from: larry::ecotope::com at: 15-Nov-2000 19:34
Hi PeO
The only documentation currently available is the preliminary View beta doc
on the rebol.com website. There is no real documentation for the features
added in the experimental versions. Most of what we know about the new
features is figured out by folks (myself and others) reading the VID source,
studying the examples on the RT rebsite (especially easy-vid), and asking
questions on this mail list. Actually, I learned about the AS-IS keyword
from a post on this list. Perhaps someone from RT will comment on the
schedule (if any) for new View docs.
Cheers
-Larry
[3/5] from: peoyli:algonet:se at: 15-Nov-2000 19:24
It's me again.. :)
Anyone noticed this in View 0.10.38 ?
>From console:
>> text_1: "Line 1^/Line 2^/Line 3"
== "Line 1^/Line 2^/Line 3"
>> print text_1
Line 1
Line 2
Line 3
>>
everything ok, so far..
>> view layout [t1: text 100x200 with [text: text_1]
All the lines are shown on the same line.... Close the window and
print text_1:
>> print text_1
Line 1 Line 2 Line 3
Where did the newlines go ?
>> text_1: "Line 1^/Line 2^/Line 3"
>> i: 4 view layout [t1: text 100x200 with [text: text_1] [
[ insert tail t1/text join "Line" [i #"^/"] i: i + 1
[ ]
[ ]
The three predefined lines are shown on one line...
Clicking the text appends "Line 4" at the same line..
And clicking more appends "Line 5" etc. below the "Line 1 Line 2 Line 3Line 4"
line... (as expected)
>> print text_1
Line 1 Line 2 Line 3Line4
Line5
Line6
Line7
Line8
Line9
Line10
Line11
Line12
Line13
Line14
Line15
Line16
Line17
Line18
>> view layout [t1: text 100x200 with [text: text_1]]
..everything is a mess... close the window...
>> print text_1
Line 1 Line 2 Line 3Line4 Line5 Line6 Line7 Line8 Line9 Line10 Line11 Line12 Line13 Line14
Line15 Line16 Line17 Line18
and this explains it, but the reason for that this happens still is
missing...
/PeO
[4/5] from: peoyli:algonet:se at: 15-Nov-2000 21:52
> Hi PeO
>
> Try this:
>
> >> view layout [t1: text 100x200 text_1 as-is]
>
> Notice the keyword AS-IS. Also you don't really need the WITH because layout
> will assign anything that evaluates to a string as the string to be
> displayed in the text element.
>
Where are these keywords documented, so one wouldn't have to dive into
the vid source to find something that can do what one expects ?
/PeO
[5/5] from: g:santilli:tiscalinet:it at: 16-Nov-2000 15:44
P-O Yliniemi wrote:
> Anyone noticed this in View 0.10.38 ?
[...]
You should use:
Text text_1 as-is
to avoid that. TEXT/INIT does a TRIM/LINES on the string.
HTH,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/