Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Bug in Area

From: nitsch-lists:netcologne at: 3-Nov-2001 3:46

RE: [REBOL] Re: Bug in Area Hi Brett [brett--codeconscious--com] wrote:
> 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.
i hope i had understand you ;-) if i want to change a face, i call its update with appropriate parameters. in other systems, this parameters are given the usual way: update x y z . in rebol we set parameters in the face. then call show. so state-variables are the parameters.
> 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). >
it may be automatic in some releases. Not by a function, but because of 'query . that would allow 'redraw to check if the text has changed. unfortunally only one function should clear this flag, but show/redraw would be a good place for it? today, for fields (one line, <200chars) i can avoid it and for areas i do it allways. simple rule. maybe the name could be more obvious, face/text-analysed: none or that?
> 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.
me to first. after a while i got the view-way: tell all you want and then call a function to process that (like show).
> <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. >