[squeak-dev] The Inbox: ToolBuilder-Kernel-ct.162.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Sep 11 18:16:57 UTC 2022


Hi Jakob, hi all,


I consider your use case of nils completely legitimate.


> Anyway, to write actual help texts is better than nil...

Unless you actually can bring up a help text that adds real value but does not only repeat the menu label, better don't. Too much redundancy, too much distraction.

Anyone objects if I merge this in the Trunk so that nil values for help are allowed again?

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <jakres+squeak at gmail.com>
Gesendet: Sonntag, 17. Juli 2022 21:45:20
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: ToolBuilder-Kernel-ct.162.mcz

Hi,

I noticed the broken menus in the Git Browser today, too. I fixed it by putting actual help texts now, and there will be a fix release soon. Although the sudden breakage did certainly surprise me. :o)

If somebody is wondering why I had nil as help text in some cases: I actually use 4-tuples and pass them through another custom method that filters away the elements where the 4th element is false (from some conditional expression). That avoids lots of "}. condition ifTrue: [ ... ]. menu addList: {" interruptions of the item list. Anyway, to write actual help texts is better than nil...

Kind regards,
Jakob

Am So., 17. Juli 2022 um 15:26 Uhr schrieb <commits at source.squeak.org<mailto:commits at source.squeak.org>>:
A new version of ToolBuilder-Kernel was added to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.162.mcz

==================== Summary ====================

Name: ToolBuilder-Kernel-ct.162
Author: ct
Time: 17 July 2022, 3:26:41.516615 pm
UUID: dc34f48c-6a59-a746-9151-486b8dfb3fcf
Ancestors: ToolBuilder-Kernel-eem.161

In menu construction from tuples, allows nil values for the help.

Follow up of ToolBuilder-Kernel-eem.161. Complements Morphic-ct.2021. For instance, some menus in the Git Browser failed to open since that change. See SquitBrowser>>#buildMenu:from: and senders. Inbox because I'm not sure whether we should allow nil values here or whether Squot should be fixed instead.

=============== Diff against ToolBuilder-Kernel-eem.161 ===============

Item was added:
+ ----- Method: PluggableMenuSpec>>addList: (in category 'construction') -----
+ addList: aList
+       "Add the given items to this menu, where each item is a pair (<string> <actionSelector>)..  If an element of the list is simply the symobl $-, add a line to the receiver.  The optional third element of each entry, if present, provides balloon help."
+
+       aList do: [:tuple |
+               tuple == #-
+                       ifTrue: [self addSeparator]
+                       ifFalse:[ | item |
+                               item := self add: tuple first target: model selector: tuple second argumentList: #().
+                               tuple size > 2 ifTrue:
+                                       [tuple third ifNotNil: [:help |
+                                               item help: help withCRs]]]]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220911/374c0df8/attachment.html>


More information about the Squeak-dev mailing list