[squeak-dev] More pluggable dialog fun (was Re: FileChooser/SaverDialog)

Marcel Taeumel marcel.taeumel at hpi.de
Sun Nov 5 11:57:23 UTC 2017


Hi, there.

Here is some context about the current state of Squeak's dialog implementation.

Last year, I worked on UI themes and hence touched the sources of all relevant widgets. In the course of understanding and changing the existing implementations, I took the opportunity to clean-up and simplify things. The biggest construction sites included windows, menus, buttons, and dialogs. The biggest clean-up was a consistent use of the #setDefaultParameters-pattern, which has been there for a long time.

Until then, Squeak has had three kinds of dialogs: FillInTheBlankMorph, UserDialogBoxMorph, and SystemWindows that where "modal children" of other system windows. I merged the first two kinds and harmonized their visual appearance.

...became...


I largely ignored system windows that where effectively treated as dialogs, which is (1) modal ownership and sometimes (2) modally exclusive user input. Two common candidates of these are the font-chooser dialog and the file/folder-chooser dialog:


As you can see, a conversion to a visual dialog-like appearance might entail some changes in DialogWindow and PluggableDialogWindow(Spec). Yet, I think there are still (1) title, (2) description, (3) opt. resizable content, and (4) a button bar --- like in all other dialogs. One could even think of making those modally exclusive ... but the need for copying necessary information from another morph to fulfill the dialogs request is too common.

Why do I write this? A dialog is no regular window because:
1. It poses a single request and therefore looks different.
2. It is modal in a sense that it can (a) belong to a window/dialog and (b) interrupt a complex job with user input and (c) closing it means aborting a job not just closing a view on objects.
3. It has a programming interface that is more like "request" and not like "open/show".

Consequently, file/folder choosers and font choosers should be real dialogs: code-wise and graphics-wise:


Simple user requests don't need interactive content. Some might not have a description but only that content. Some might only have a title and the buttons. The message of title / description is debatable. I think that titles should be more generic like "Choose file" and descriptions should be more context specific to explain what kind of file is required. So that titles can be one-lines and descriptions be multi-liners.

Best,
Marcel

Am 05.11.2017 02:19:45 schrieb Bob Arning <arning315 at comcast.net>:
That's the lack of options I was talking about. What if one of those 40 that TB did *not* give you was just the ticket? That said, you can probably make a quick list of the morphs *does* use and consider that your Beginner's Guide to Morphic. Then maybe add a few more morphs that seem particularly useful.


On 11/4/17 9:04 PM, tim Rowledge wrote:

One of the nice aspects of toolbuilder is the way it provides clear widget options - ask for a button and you get a button without having to check out every damn button related morph class - did you know there are *40* classes with ‘button’ in the name?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 9431 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 5364 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 13846 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 8646 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20710 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 37622 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 39258 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171105/1fb8e634/attachment-0013.png>


More information about the Squeak-dev mailing list