[REBOL] Text list problems
From: geza67::freestart::hu at: 5-Jul-2001 22:27
Hello fellow REBOLers !
Maybe it's trivial but Ican't get through this ;-) :
I have a text list ('tl), with some of the 'tl/lines being multiline (i.e. containing
a newline "^/" ). Now if I query the selection with
index? find tl/lines tl/picked
when choosing single line text list members, everything is OK but incase of
these multiline 'tl/lines members 'none is found ...
Although I loaded 'tl with _strings_ (and probe-ing 'tl/lines justifies that they
are represented really as strings in the text list!), 'tl/picked is a block with
_words_ , not with the original strings. E.g.:
== [ "...." "this is a string" "..." ]
== [this is a string] ???!!!
Now if a member has a newline in it strange things happen:
== ["..." "this is^/ a string" "..."]
== [this is
a string] ???!!!
This last example was _really_ printed out on the REBOL console as a block
of _words_ with a _newline_ in position! For transforming back this weird
tl/picked 'to-string doesn't work:
Transformation via 'form neither succeeds:
== "this is a string"
(note, the newline "^/" disappears , it is converted to a space! )
I would simply need the block brackets to be "converted" to string delimiters
and leaving that newline char intact. How could be this achieved ?
Is there an alternative getting back not the content (in 'tl/picked) but directly
the numeric index position(s) of the selection? I can't believe that the VID
was designed so badly (but surely not well documented!) that one should
expose a nasty "index? find ... " search overhead to get the index of the
How can I change the default multiple choice behavior of a text list to a strict
one-choice-only scheme ?
I thankfully appreciate your kind input!