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

layout patch

 [1/4] from: antonr::lexicon::net at: 5-Jul-2004 22:47

I have patched LAYOUT to fix the "across after origin" bug (and related bugs). I would like to know if anyone patched LAYOUT to fix this already, and if anyone sees any problems with this patch. ; layout patch to fix "across after origin" bug etc. use [body rtn word][ body: second :layout rtn: select body first [rtn:] word: rtn/4/1 ; example word ('way) change second rtn bind [(max where max-off)] word ] The VID dialect words that are closely involved: return across below origin guide So far I haven't seen any problems with the patch, so I have put it in my user.r to take it for a spin. I will leave it there until I see a problem. Example which normally shows the bug: view layout [origin 10x10 across box red] Anton.

 [2/4] from: greggirwin:mindspring at: 5-Jul-2004 11:17

Hi Anton, AR> I have patched LAYOUT to fix the "across after origin" AR> bug (and related bugs). Thanks for posting that! I know RT has heard about this one, but you should definitely post this to the REBOL-View world so, if all is well with it, it can make its way into the View 1.3 release. -- Gregg

 [3/4] from: didec:tiscali at: 5-Jul-2004 23:13

Romano already post a correction for this bug in the Tracker (#341) : This is the fix (in layout func) : ;CHANGE ;| 'origin [set pos [pair! | integer!] (origin: pos * 1x1) | none] (where: origin max-off: 0x0) ;WITH | 'origin [set pos [pair! | integer!] (origin: pos * 1x1) | none] (max-off: where: origin) ;END -romano I didn't test it. As you are fighting against this bug, maybe you can ? DideC

 [4/4] from: antonr:lexicon at: 7-Jul-2004 2:11

I was thinking about that approach used by Romano. 'guide would also need to be patched in that case, as it is also bad. (Try this: view layout [across box leaf guide below box red] or try using 'return after an 'origin or 'guide. therefore I dealt with them together in rtn. (Disclaimer: I don't pretend to understand it fully yet, but I was almost to the point of fully documenting each variable when I came to this intuitive leap of a solution. Of course we would all love documentation, but I promise nothing.:) I think Romano's way is better. I'll try patching 'guide later. I think to -> (max-off: guide) Thanks DideC, Gregg and Romano. This has been a long-standing bug/quirk, probably because it's so easy to work around, and patching is not so simple. Anton.