Help on View
[1/5] from: luca:krenet:it at: 20-Aug-2001 9:41
Can someone explain me the reason of a strange behavior?
The following code doesn't clean the "area" field.
Just press "valorize" and then "clean".
Thanks.
REBOL [
]
Preview-form: layout [
button 150x24 "valorize" [valorize]
testo: area "testo" 700x200 wrap below
button "clean" [clear testo/text show testo]
]
valorize: func[] [
testo/text: {<titolo>12234567891 asdfg, asdfghjk - aswedfrtg azxcdftre dsr gjftptyf <p>
lkdjflkdsjflkdsjflkdsjflks flkdsjflkds flkjdslkfjdslkf lkdsj flkdslkfj dslkfjdslkj flkds
fkds flkslk fjdslkjflkds flkdj fklsd
} show testo
]
view/title Preview-form "Test"
[2/5] from: arolls:bigpond:au at: 20-Aug-2001 18:35
Someone explained it before, and made a better
solution.
For now, you can do this:
button "clean" [testo/text: copy " " show testo]
and also, you should
valorize: func [][
testo/text: copy {<titolo>122345...
Actually, I think I remember now.
Something to do with testo/line-list not being cleared?
Umm... Need to check older mails about a week ago...
[3/5] from: ryanc:iesco-dms at: 20-Aug-2001 10:24
Something even more interesting happens when you use this code for the clean button:
button "clean" [testo/text: copy "" show testo]
Seems you can peek through rebols memory as you push it repeatedly. Kinda fun.
Anyhow, my explanation is that its a big fat bug, and a good excuse to use feedback.
--Ryan
Luca Truffarelli wrote:
> Can someone explain me the reason of a strange behavior?
> The following code doesn't clean the "area" field.
<<quoted lines omitted: 17>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
[4/5] from: carl::cybercraft::co::nz at: 21-Aug-2001 10:22
On 20-Aug-01, Anton wrote:
> Someone explained it before, and made a better
> solution. For now, you can do this:
<<quoted lines omitted: 5>>
> Something to do with testo/line-list not being cleared?
> Umm... Need to check older mails about a week ago...
Yes - one of my mails - but I'll save you the search. This is from
the View guide...
line-list: A BLOCK that is used to track the offsets of text lines
when text is being displayed. When more than 200 characters of text
are being displayed, this list should be set to NONE when large
changes are made to the text. This allows REBOL to recalculate the
locations of all TEXT lines.
So, adding...
testo/line-list: none
before show testo should fix the problem.
So, a bug Ryan? Hard to say, but it has the feel of a work-around of
a bug. (:
>> Can someone explain me the reason of a strange behavior?
>> The following code doesn't clean the "area" field.
<<quoted lines omitted: 21>>
>>
>> view/title Preview-form "Test"
--
Carl Read
[5/5] from: luca:krenet:it at: 24-Aug-2001 17:14
At 10:22 21/08/2001 +1200, you wrote:
>On 20-Aug-01, Anton wrote:
>> Someone explained it before, and made a better
<<quoted lines omitted: 43>>
>>>
>>> view/title Preview-form "Test"
Thank you to everybody and excuse me if I haven't answered you before. :(
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted