This has to be a known text-list bug...
[1/7] from: carl::cybercraft::co::nz at: 17-Mar-2004 6:05
>> layout [t: text-list "a b c" "a b c"]
>> probe t/data
["a b c" "a b c"]
So how come the first string has had its extra spaces removed?!?
(Same result on View 1.2.1, 1.2.5 and 1.2.10.) And is there any
known fix for this?
--
Carl Read
[2/7] from: gchiu:compkarori at: 17-Mar-2004 6:05
Carl Read wrote.. apparently on 17-Mar-2004/16:04:04+13:00
>So how come the first string has had its extra spaces removed?!?
>(Same result on View 1.2.1, 1.2.5 and 1.2.10.) And is there any
>known fix for this?
>
>> layout [t: text-list "a b c" "a b c"]
>> probe t/data
["a b c" "a b c"]
== ["a b c" "a b c"]
>> layout [t: text-list as-is "a b c" "a b c"]
>> probe t/data
["a b c" "a b c"]
== ["a b c" "a b c"]
--
Graham Chiu
http://www.compkarori.com/cerebrus
http://www.compkarori.com/rebolml
[3/7] from: carl:cybercraft at: 17-Mar-2004 6:05
On 17-Mar-04, Carl Read wrote:
>>> layout [t: text-list "a b c" "a b c"]
>>> probe t/data
> ["a b c" "a b c"]
> So how come the first string has had its extra spaces removed?!?
> (Same result on View 1.2.1, 1.2.5 and 1.2.10.) And is there any
> known fix for this?
Well, found a work-around for it...
>> layout [
[ t: text-list
[ do [append t/data ["a b c" "a b c"]]
[ ]
>> probe t/data
["a b c" "a b c"]
Anyway, has this been fixed with the latest betas? It has to be a
well-know bug, right? Oh yes, and this shows up the bug too...
strings: [
"a b c"
"d e f"
"g h i"
]
view layout [text-list data strings]
--
Carl Read
[4/7] from: atruter:labyrinth:au at: 17-Mar-2004 14:54
> And is there any known fix for this?
view layout [t: text-list "a b c" "a b c" as-is]
Regards,
Ashley
[5/7] from: carl:cybercraft at: 17-Mar-2004 21:25
>=== Original Message >
>Carl Read wrote.. apparently on 17-Mar-2004/16:04:04+13:00
<<quoted lines omitted: 10>>
>["a b c" "a b c"]
>== ["a b c" "a b c"]
Well okay. :)
But does as-is do anything more useful than stop the first entry in a text-list getting
messed with? And is there an as-not to cause them all to have spaces extracted?
In other words, why?
-- Carl Read
[6/7] from: didec:tiscali at: 17-Mar-2004 17:59
Re: This has to be a known text-list bug...
Hi
> Well okay. :)
>
> But does as-is do anything more useful than stop the first entry in a text-list getting
messed with? And is there an as-not to cause them all to have spaces extracted?
>
> In other words, why?
>
> -- Carl Read
>
The first line in the text-list init block is :
if all [not flag-face? self as-is string? text] [trim/lines text]
and this cause the problem.
During the layout process, the 'text facet is always set on the first string (by the
words/data func or the multi/texts func) ans so this line is trimed if 'as-is is not
provide.
Anyway, this bug was referenced as #96 in View 1.3 bug list and will be solved
http://www.rebol.net/cgi-bin/projects/track.r?id=96&
DideC
[7/7] from: g:santilli:tiscalinet:it at: 17-Mar-2004 18:30
Hi Carl,
On Wednesday, March 17, 2004, 9:02:31 AM, you wrote:
cccn> In other words, why?
Because TEXT-LIST is based on TEXT, and in TEXT's INIT block
TRIM/LINES is applied to FACE/TEXT which happens to hold the first
string (all the strings are in /TEXTS, but only the first goes to
TEXT).
Try with:
Text "a b c"
Text as-is "a b c"
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted