[REBOL] Re: rebocalc bugs with 1.2.46.3.1
From: antonr::lexicon::net at: 14-Nov-2004 19:58
View versions <= 1.2.25 the headings seem fine, but
View versions >= 1.2.26 show this bug.
I investigated by opening each rebol version, doing
the following lines of code, then pasting into a text editor
so I can make easy comparisons:
layout [text with [write clipboard:// join {; } [system/version newline mold
init]]] quit
write clipboard:// join {; } [system/version newline mold
system/view/vid/vid-styles/text] quit
If you search for "xy" you can see that the attribute xy has been
added to the TEXT style in Rebol/View 1.2.26
This is a bug which happens inevitably when user code
extends the face definition with its own attributes (ie. 'xy)
The "official", safe way is to put all extra user state data
into face/user-data, but most people (including me) can't
be bothered because it ends up being too wordy to refer
to it, and we are confident of being able to debug it :)
(This kind of bug also happens more often when people use
such short variable names...)
So what to do about it ?
Looking at the TEXT style definition, it only uses 'xy
as a temporary variable in the INIT code. (The shock!)
Therefore I recommend to remove the 'xy attribute from the
face definition and wrap the code, which uses xy in INIT, like so:
use [xy][ ... ]
This should make rebocalc.r work once again.
(And it will save a tiny piece of memory for every instance
of TEXT and TEXT-based styles).
But it will need to be tested first, added to RAMBO, and
finally reintegrated into rebol.
So, yes, it is worth signalling :)
Anton.