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

[REBOL] Re: win-offset? screen-offset? bug

From: brett:codeconscious at: 25-Mar-2002 1:10

> I've seen. But I am not sure it is a good idea, because the panel style is > used internally by RT styles and custom styles and i do not know if your > change can mess something. To be sure, we should check all the styles and
all
> request-file/date/... the choice and so on, to be sure that that fix does
not
> mess something. And we should change many scripts. In my programs i make a
new
> assignement to the parent-face after every use of a panel style and I
think
> that many other people has made something like this. So the fix create to
me
> more problems than it fix. The direct solution is very simple (get the
parent
> of the face) and i already use it in many scripts.
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). 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. 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 changed or not. Though I believe it is only variables set to PANEL that are affected at this time (Rebol/View). BTW, I did a quick search but could not find PANEL being used by RT styles internally could you give an example please?
>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. 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. 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. Regards, Brett.