<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</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>If you're needing a decision, I'd vote for option 3.</p>
<p></p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</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 Taeumel, Marcel<br>
<b>Gesendet:</b> Mittwoch, 16. Oktober 2019 11:14:15<br>
<b>An:</b> gettimothy via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: HelpSystem-Core-ct.123.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Quick suggestion on the formatting. This one:
<div><br>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">^ self canBrowseTopic or: [</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">
<span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">   parentTopic ifNotNil: #canBrowseSubtopic ifNil: [false]]</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">could become:</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">^ self canBrowseTopic or: [</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">
<span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">   parentTopic</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">ifNil:
 [false]</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">ifNotNil:
 [:topic | topic canBrowseSubtopic]]</span></div>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">or:</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div>
<div style="font-size: 13.3333px">
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">^ self canBrowseTopic</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">      or: [parentTopic notNil and: </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">[parentTopic canBrowseSubtopic]]</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Hmmm... what are other opinions on this? There is no need for #ifNil/ifNotNil in such a boolean expression?</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div>
<div style="font-size: 13.3333px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div style="font-size: 13.3333px"><br>
</div>
</div>
</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 13.10.2019 21:04:19 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">A new version of HelpSystem-Core was added to project The Inbox:<br>
http://source.squeak.org/inbox/HelpSystem-Core-ct.123.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: HelpSystem-Core-ct.123<br>
Author: ct<br>
Time: 13 October 2019, 9:04:08.373932 pm<br>
UUID: dec7ceca-320f-d945-8d2a-c2f6a5e49a52<br>
Ancestors: HelpSystem-Core-ct.120<br>
<br>
Refactors HelpBrowser menu: Move menu stuff from HelpBrowser into HelpTopic hierarchy in favor of a better object design<br>
<br>
Thanks again, Marcel :-)<br>
<br>
=============== Diff against HelpSystem-Core-ct.120 ===============<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>browseTopicFromParent: (in category 'tools') -----<br>
+ browseTopicFromParent: parentTopic<br>
+ <br>
+ self canBrowseTopic<br>
+ ifTrue: [^ self browseTopic].<br>
+ parentTopic canBrowseSubtopic<br>
+ ifTrue: [^ parentTopic browseSubtopic: self].<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>canBrowseSubtopic (in category 'testing') -----<br>
+ canBrowseSubtopic<br>
+ <br>
+ ^ false!<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ false!<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>canBrowseTopicFromParent: (in category 'testing') -----<br>
+ canBrowseTopicFromParent: parentTopic<br>
+ <br>
+ ^ self canBrowseTopic or: [<br>
+ parentTopic ifNotNil: #canBrowseSubtopic ifNil: [false]]!<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>topicMenu:parentTopic: (in category 'menus') -----<br>
+ topicMenu: aMenu parentTopic: parentTopic<br>
+ <br>
+ aMenu<br>
+ add: 'Inspect (i)' translated target: self action: #inspect;<br>
+ add: 'Explore (I)' translated target: self action: #explore.<br>
+ (self canBrowseTopicFromParent: parentTopic)<br>
+ ifTrue: [<br>
+ aMenu add: 'Browse (b)' translated<br>
+ target: self<br>
+ selector: #browseTopicFromParent:<br>
+ argumentList: {parentTopic} ].<br>
+ <br>
+ ^ aMenu!<br>
<br>
Item was added:<br>
+ ----- Method: AbstractHelpTopic>>topicMenuKey:fromParent: (in category 'menus') -----<br>
+ topicMenuKey: aChar fromParent: parentTopic<br>
+ <br>
+ aChar<br>
+ caseOf: {<br>
+ [$b] -> [(self canBrowseTopicFromParent: parentTopic)<br>
+ ifTrue: [ self browseTopicFromParent: parentTopic ]].<br>
+ [$i] -> [self inspect].<br>
+ [$I] -> [self explore] }<br>
+ otherwise: [^ false].<br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: ClassAPIHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: ClassBasedHelpTopic>>canBrowseSubtopic (in category 'testing') -----<br>
+ canBrowseSubtopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: ClassBasedHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: DirectoryBasedHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: FileBasedHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was removed:<br>
- ----- Method: HelpBrowser>>browseTopic (in category 'actions') -----<br>
- browseTopic<br>
- <br>
- ^ (self currentTopic respondsTo: #browseTopic)<br>
- ifTrue: [self currentTopic browseTopic]<br>
- ifFalse: [self currentParentTopic browseSubtopic: self currentTopic]!<br>
<br>
Item was removed:<br>
- ----- Method: HelpBrowser>>canBrowseTopic (in category 'testing') -----<br>
- canBrowseTopic<br>
- <br>
- ^ (self currentTopic respondsTo: #browseTopic)<br>
- or: [self currentParentTopic respondsTo: #browseSubtopic:]!<br>
<br>
Item was removed:<br>
- ----- Method: HelpBrowser>>exploreTopic (in category 'actions') -----<br>
- exploreTopic<br>
- <br>
- ^ self currentTopic explore!<br>
<br>
Item was removed:<br>
- ----- Method: HelpBrowser>>inspectTopic (in category 'actions') -----<br>
- inspectTopic<br>
- <br>
- ^ self currentTopic inspect!<br>
<br>
Item was changed:<br>
----- Method: HelpBrowser>>treeKey:from:event: (in category 'menus') -----<br>
treeKey: aChar from: aView event: anEvent<br>
<br>
anEvent anyModifierKeyPressed ifFalse: [^ false].<br>
+ ^ (self currentTopic topicMenuKey: aChar fromParent: self currentParentTopic)!<br>
- aChar<br>
- caseOf: {<br>
- [$b] -> [self browseTopic].<br>
- [$i] -> [self inspectTopic].<br>
- [$I] -> [self exploreTopic]. }<br>
- otherwise: [^ false].<br>
- ^ true!<br>
<br>
Item was changed:<br>
----- Method: HelpBrowser>>treeListMenu: (in category 'menus') -----<br>
treeListMenu: aMenu<br>
<treelistmenu><br>
<br>
+ ^ self currentTopic<br>
+ ifNil: [aMenu]<br>
+ ifNotNil: [:topic | topic<br>
+ topicMenu: aMenu<br>
+ parentTopic: self currentParentTopic]!<br>
- self currentTopic ifNil: [^ aMenu].<br>
- <br>
- aMenu<br>
- add: 'Inspect (i)' action: #inspectTopic;<br>
- add: 'Explore (I)' action: #exploreTopic.<br>
- <br>
- self canBrowseTopic ifTrue: [<br>
- aMenu<br>
- addLine;<br>
- add: 'Browse (b)' action: #browseTopic].<br>
- <br>
- ^ aMenu!<br>
<br>
Item was added:<br>
+ ----- Method: MethodListHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
Item was added:<br>
+ ----- Method: PackageAPIHelpTopic>>canBrowseTopic (in category 'testing') -----<br>
+ canBrowseTopic<br>
+ <br>
+ ^ true!<br>
<br>
<br>
</treelistmenu></div>
</blockquote>
</div>
</div>
</body>
</html>