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

[REBOL] Re: tool for resizable windows posted

From: brett:codeconscious at: 31-May-2001 15:32

Hi Volker, You asked for an opinion :)
> Looking at the resize-calculations, i thought maybe it could be more > general. > based around > func [SIZE-DIFF] [ > layout [ > across > t1: area SIZE-DIFF + 320x240 para [] my-text > s1: slider SIZE-DIFF * 0x1 + 16x240 [scroll-para t1 s1] > ] > ] > base-size is calculatet with size-diff set to 0x0, > the function is recalculated on every resize-event,
I think calling layout so many times is expensive. It will create so many faces that look like each other :) The problem is if the layout is complex it may become slow. Also, I'm not sure if this way of writing code is more effective than just coding the resize event directly.
> Now i discovered a problem: > how to copy data from the old layout to the new best?
I think that you should not try to copy the old layout. It seems to me that for a resuable resize tool you can go two ways: 1) By manipulating the faces that have already been created or 2) Creating a new layout, as you have done - with the acknowledgement that whoever uses the tool must take into account the way it works. So if they change some text - they have to fix the layout specification that the resize tool uses. My preference is to create a way of working that does (1) because it will be more efficient and if has the possibility that it may work with view programs that have not be created with VID. Regards, Brett.