[REBOL] Re: Bug in Area
From: brett:codeconscious at: 3-Nov-2001 0:43
Hi Volker,
> i think face/line-list is a cache.
Yes I think that is most likely, and for the reasons you give.
> face/dirty? is set if you change the text.
Remember, the Rebol/View Develop Guide says of VID:
RVDG> VID is implemented as a layer that rides on top of the REBOL/View
graphical compositing system.
I could be wrong but I think the dirty? flag is part of the VID layer not
the lower level View faces. I figure that if I'm using the VID layer and I
do something it doesn't know about, then I should work to ensure that VID is
in a consitent state when I'm finished. For ordinary uses of VID there is no
issue.
> if face/dirty?[confirm "really exiting without saving?"]
> inbuild editor uses that for example.
Mostly true, but I've documented a minor case where it fails. This happens
to be a case where the VID layer doesn't pick up a situation that sometimes
can be classed as being a dirty state. [Gee this language is bizarre :) ]
> opposition! ;-)
> view has your update in a way, but not that obvious.
Maybe you misunderstand me :)
My "update" suggestion refers to keeping the state variables consistent -
not changing the lean behaviour of the compositing engine or anything more.
Gregg, Paul and Ammon I think have shown that it is fairly easy to cause an
area to go a bit haywire. Remember Gregg said:
GI> I think there is a bug in there (i.e. we shouldn't
GI> have to manually clear the line-list when we update the text).
I must admit I thought that the line-list was part of the VID layer. Now I'm
not so sure. I have to agree with Gregg that manually clearning the
line-list seems odd. Though I think for performance the programmer should
have some way to tell the engine to recalculate the cache when he/she has
finished manipulating the text. For example you might be inserting text all
over the place in a large body of text - calculating on each modification
may be expensive. Calling a function rather than clearing the field seemed
more natural to me.
<snip redraw description>
> in rebol one can change various properties
> and action starts in the last possible moment, only one.
> more efficient and easier to track,
> but sometimes more code.
> i like it more :-)
I like the View compositing engine and VID too, though some tweaking might
be useful to make them more programmer friendly. :-)
Brett.