<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Jakob, hi all,</p>
<p><br>
</p>
<p>I consider your use case of nils completely legitimate.</p>
<p><br>
</p>
<p>> <span style="font-size: 12pt;">Anyway, to write actual help texts is better than nil...</span></p>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Anyone objects if I merge this in the Trunk so that nil values for help are allowed again?</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Jakob Reschke <jakres+squeak@gmail.com><br>
<b>Gesendet:</b> Sonntag, 17. Juli 2022 21:45:20<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: ToolBuilder-Kernel-ct.162.mcz</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>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)</div>
<div><br>
</div>
<div>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...</div>
<div><br>
</div>
<div>Kind regards,<br>
Jakob</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am So., 17. Juli 2022 um 15:26 Uhr schrieb <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
A new version of ToolBuilder-Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.162.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.162.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ToolBuilder-Kernel-ct.162<br>
Author: ct<br>
Time: 17 July 2022, 3:26:41.516615 pm<br>
UUID: dc34f48c-6a59-a746-9151-486b8dfb3fcf<br>
Ancestors: ToolBuilder-Kernel-eem.161<br>
<br>
In menu construction from tuples, allows nil values for the help.<br>
<br>
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.<br>
<br>
=============== Diff against ToolBuilder-Kernel-eem.161 ===============<br>
<br>
Item was added:<br>
+ ----- Method: PluggableMenuSpec>>addList: (in category 'construction') -----<br>
+ addList: aList<br>
+       "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."<br>
+ <br>
+       aList do: [:tuple |<br>
+               tuple == #-<br>
+                       ifTrue: [self addSeparator]<br>
+                       ifFalse:[ | item |<br>
+                               item := self add: tuple first target: model selector: tuple second argumentList: #().<br>
+                               tuple size > 2 ifTrue:<br>
+                                       [tuple third ifNotNil: [:help |<br>
+                                               item help: help withCRs]]]]!<br>
<br>
<br>
</blockquote>
</div>
</div>
</body>
</html>