[squeak-dev] FileChooser/SaverDialog

tim Rowledge tim at rowledge.org
Fri Nov 3 00:33:37 UTC 2017


> On 02-11-2017, at 2:19 PM, Bob Arning <arning315 at comcast.net> wrote:
> The paneMorph is a BorderedMorph instance with corner grips, which in itself seems a bit odd - I mean, why a set of grips wrapped around the inner content?
>  in #buildPluggableDialog:
> 
>    widget paneMorph wantsPaneSplitters ifTrue: [
>         widget paneMorph addCornerGrips"addEdgeGrips".
>         widget paneMorph grips do: [:ea | ea drawCornerResizeHandles: true]].
> 
> this offers the ability to resize the submorphs of the paneMorph like you resize the panes in a browser

Absolutely - allowing movable splitters between sub-morphs of the pane is a good idea. Putting drag-handles on the corners of the panemorph doesn’t seem quite as useful since the dialog is (properly, in my view) shrinkwrapped around its content and so the drag-handles usurp the normal window border dragging (which admittedly seems to be turned off for dialogs, which is probably not so good) and worst of all, it doesn’t work very well. It looks like one of the other morphs involved is not resizing horizontally when you reduce the width, so you get a narrower panemorph but the window as a whole stays at the larger width.

> 
>> It’s not like using them to resize the dialog actually works properly - try increasing the size and then reducing it. Better to do that with the more ordinary window resizing grips. What about the BorderedMorph is breaking the submorph layout?
> 
> #buildPluggablePanel: does self setLayout: aSpec layout in: widget.
> #buildPluggableDialog: does *not* do the same for its paneMorph

Hmm, interesting. I just added that and it makes the very plausible difference. Nice catch.

Other observations to throw into the mix - 
  PluggableDialogSpec over-rides #horizontalResizing and #verticalResizing to insist both are #rigid, which puzzles me. Versions suggests both are Marcel choices - do you remember why Marcel? Ah, well that’s fun; if I remove that over-ride so I can have #shrinkWrap for the vertical resizing of my panemorph, then all the ‘normal’ dialogs used for the ListChoosers are broken.
  Despite the code appearing to add the size/split handles, they don’t actually appear, which is odd until you notice that the #update: method which is used to get the child morphs removes all the submorphs before fetching the new ones - asnd so carefully deletes the handles. Blerk.

Y’know, there are time when I think we’ve managed to make a lot of broken code.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Oxymorons: Business ethics




More information about the Squeak-dev mailing list