[racket] toy graphical list editor

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed May 25 05:15:13 EDT 2011

At Wed, 25 May 2011 10:19:33 +0200, Marijn wrote:
> On 05/24/11 20:59, Matthew Flatt wrote:
> > At Tue, 24 May 2011 15:54:55 +0200, Marijn wrote:
> >> After changing all the values to "1", when pressing an insert-button
> >> *sometimes* the window is resized horizontally (slightly larger width)
> >> and *sometimes* the window flickers to slightly larger horizontally, but
> >> remains the same width. According to `get-graphical-min-size' the
> >> horizontal width stays constant at, for me, 58. I wrote another program
> >> which exhibits this flickering behavior for me which I attached. Again
> >> the size output seems to be fine, at least on the granularity
> >> instrumented. Is this expected behavior?
> > 
> > No --- I've pushed a fix to repair the resize flicker.
> 
> Thanks for the quick (as usual) fix! I'd be interested to know what was
> happening before the fix.

A `text-field%' is internally constructed as a panel and an
`editor-canvas%'. The minimum width and height are configured after the
pieces are created. I'm not clear on why the frame size bounced, but
the GUI toolbox unnecessarily updating the window layout for the
intermediate states of `text-field%' construction. The repair was to
wrap the internal creation and configuration of a `text-field%' with
`begin-container-sequence' and `end-container-sequence'.



Posted on the users mailing list.