[squeak-dev] Questionable constraint in ProportionalSplitterMorph

Trygve Reenskaug trygver at ifi.uio.no
Mon Jun 2 14:09:27 UTC 2008


Many thanks, Gary.
This package seems to include a lot of stuff I have been missing in the 
release image.
--Trygve

On 02.06.2008 12:19, Gary Chambers wrote:
> The UI Enhancements package contains modifications to provide the 
> behaviour you are expecting.
>  
> http://wiki.squeak.org/squeak/6005
>  
> Regards, Gary.
>
>     -----Original Message-----
>     *From:* squeak-dev-bounces at lists.squeakfoundation.org
>     [mailto:squeak-dev-bounces at lists.squeakfoundation.org]*On Behalf
>     Of *Trygve Reenskaug
>     *Sent:* 01 June 2008 8:53 PM
>     *To:* The general-purpose Squeak developers list
>     *Subject:* [squeak-dev] Questionable constraint in
>     ProportionalSplitterMorph
>
>     Squeak3.10.gamma.7159, WinXP/SP2
>
>     I have a window with four panes:
>         top left: LayoutFrame fractions: (0 at 0 corner: 0.2 at 0.5)).
>         top right pane: LayoutFrame fractions: (0.2 at 0 corner: 1 at 0.5).
>         bottom left pane: LayoutFrame fractions: (0 at 0.5 corner: 0.19 at 1).
>         bottom right pane: LayoutFrame fractions: (0.19 at 0.5 corner: 1 at 1).
>
>     self addPaneSplitters does its impressive magic;
>         a horizontal pane splitter right across the window at y=0.5
>         two vertical pane splitters one between top left and top right
>     and another between bottom left and bottom right.
>     (The latter two has 'splitsTopAndBottom'=false)
>
>     The curious thing is that the two vertical pane splitters are
>     linked; any one of them cannot be moved past the other one. The
>     constraint is in these methods
>     /*ProportionalSplitterMorph>>*/
>         *normalizedX: x*
>                  ^ (x max: self leftBoundary) min: self rightBoundary
>         *rightBoundary*
>                 ^ (self splitterRight ifNil: [self containingWindow
>     panelRect right] ifNotNil: [self splitterRight left]) - 50
>         *splitterRight*
>             | splitters |
>             splitters _ ((self siblingSplitters select: [:each | each
>     x > self x]) asSortedCollection: [:a :b | a x < b x]). 
>             ^ splitters ifEmpty: nil ifNotEmpty: [splitters first]
>         *siblingSplitters*
>             ^ self owner submorphsSatisfying: [:each | (each isKindOf:
>     self class) and: [self splitsTopAndBottom = each
>     splitsTopAndBottom] and: [each ~= self]]
>        
>     Does anybody know the motivation for this curious behavior? The
>     easiest workaround would be to hack *siblingSplitters *to return
>     an empty collection. Perhaps it would be better with a new
>     preference? (Subclassing /*ProportionalSplitterMorph*/ does not
>     seem practicable).
>
>     I'll be grateful for enlightenment about this curious behavior.
>     --Trygve
>     -- 
>
>     Trygve Reenskaug       mailto: trygver at ifi.uio.no
>
>     Morgedalsvn. 5A         http://heim.ifi.uio.no/~trygver
>
>     N-0378 Oslo               Tel: (+47) 22 49 57 27
>
>     Norway
>
> ------------------------------------------------------------------------
>
>
>   

-- 

Trygve Reenskaug       mailto: trygver at ifi.uio.no

Morgedalsvn. 5A         http://heim.ifi.uio.no/~trygver

N-0378 Oslo               Tel: (+47) 22 49 57 27

Norway

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080602/1ea80585/attachment.htm


More information about the Squeak-dev mailing list