[REBOL] Re: win-offset? screen-offset? bug
From: rotenca:telvia:it at: 24-Mar-2002 20:04
> I see your point but I disagree. Nothing demands all scripts to change.
> People can choose to use the patch or not - even on a script by script
> basis if necessary. They can test and if they don't like it they don't
> need to use it. Also while the direct solution is simple it is, in my
> opinion, likely to fail in future. So I think you should change the
> script if you want it to work on later versions of View - whether you
> use my patch or not (see below).
I understand your point of view. But if RT doesn't want to make many scripts
fail, they must introduce a new style with a different behaviour. I put
patches in my user.r so i can't easy change layout for every script i launch
(perhaps it is not the best choice).
> Your logic would imply that you will not use your modified win-offset?
> and screen-offset? functions. I most likely will - they will save me
> time in future.
True. If the patch generates more problems than it resolve it should not been
used. We must evaluate if the patch is time saving or time wasting, it is not
always easy. For example i have a patch of mine to make show-popup truely
modal, but i think it is an hack which can easy fail in the next version, so i
do not use it. I have a patch whic makes layout more fast but i think that
layout is a function that will change in future, so i do not want to use a
patch which i am sure it will fail in the next version only for a 20-30% gain.
Instead i think that your patch of FTP must be used, because we have no
alternative to read some sites, so i think which it is a good patch. And i
think that win-offset and screen-offset are so buggy that they must absolutely
changed by RT. The last two, indeed, are not patches in the true sense of
word, are different and indipendent functions which i could use with a
> As for checking all the styles, etc, that is RT's job - I've notified
> them of the bug through feedback. They'll decide whether it should be
Tell me: the feedback send you back a ticket? The last 2 times i emailed them
they do not send back any ticket like in the previous times. (i do not speack
of answer, i see one of them every four bugs sent :-)
> changed or not. Though I believe it is only variables set to PANEL that
> are affected at this time (Rebol/View).
I think you are right.
> BTW, I did a quick search but could not find PANEL being used by RT
> styles internally could you give an example please?
I did not say that it is used, i said we must check all the RT code to be sure
nothing is mess. Indeed, I can't find any use of it. And i ask myself why RT
in the How-to on making sub-panels does not speak of panel style?
> From my point of view I prefer not to make my scripts dependent on
> bugs. I'd rather patch a bug so that my script will not break when the
> bug is eventually fixed or make it tolerant to change. And I do expect
> a change. The core language is changing so I assume the graphical
> mezzanine functions are open to change too.
Well, but often bugs are corrected with a new function, a new arg, a new flag.
For example: a new panel style like mine in the previous message. We can not
know what will make RT. Another thing: if layout changes and the bug is not
repaired or is repaired with a new style, your patch will fail, else if RT
changes layout and the style, both method will fail. It is not easy to say
what is the right thing, and in this case i prefer not to change layout. But i
could be wrong.
> As I mentioned above I believe the direct solution is likely to fail in
> futur and even if you don't agree with the patch, I think you should
> use a different workaround. It should not be too hard to make these
> changes - they are simple.
> If the code is:
> lyo: layout [p: panel [b: box]]
> Then instead of:
> p: p/parent-face
> This is better:
> p: b/parent-face
> or perhaps not as nice:
> p: lyo/pane/1
> These workarounds are dependent on good behaviour not bad.
This is a good point, but not always i have a var pointer to the inner faces.
I have took my decision: i'll use a new panel style like panel2 in the
previous message, so i should be in a safe zone :-)
> Anyways this discussion illustrates a fundamental issue with
> distributed systems. I was once told by a project leader of Java
> projects that Java meant "Write once, test everywhere". Rebol is not at
> that stage (yet?). Maybe though some conventions or language support
> are required to ensure my changes and yours will work on all systems.
Back compatibility is a must for RT? I do not know.