The Trunk: HelpSystem-Core-mt.82.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: HelpSystem-Core-mt.82.mcz

commits-2
Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-mt.82.mcz

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

Name: HelpSystem-Core-mt.82
Author: mt
Time: 17 November 2015, 5:48:49.451 pm
UUID: f3eff79c-e8f2-45a0-bb74-8503bcc4436d
Ancestors: HelpSystem-Core-mt.81

Adds the possibility to show a specific topic when opening the help browser. Open the fest topic that is not empty by default (left-deep tree search).

=============== Diff against HelpSystem-Core-mt.81 ===============

Item was changed:
  ----- Method: HelpBrowser class>>open (in category 'instance creation') -----
  open
+
+ | window |
+ window := self openOn: CustomHelp.
+ window model showFirstTopic.
+ ^ window!
- ^self openOn: CustomHelp!

Item was added:
+ ----- Method: HelpBrowser>>detect:ifFound: (in category 'enumeration') -----
+ detect: block ifFound: foundBlock
+
+ self do: [:topic :path | (block value: topic)
+ ifTrue: [foundBlock cull: topic cull: path. ^ topic]].!

Item was added:
+ ----- Method: HelpBrowser>>do: (in category 'enumeration') -----
+ do: block
+
+ self do: block in: self toplevelTopics path: #().!

Item was added:
+ ----- Method: HelpBrowser>>do:in:path: (in category 'enumeration') -----
+ do: block in: topics path: path
+
+ topics do: [:topic |
+ block cull: topic cull: path.
+
+ topic hasSubtopics ifTrue: [
+ self do: block in: topic subtopics path: path, {topic}]].!

Item was added:
+ ----- Method: HelpBrowser>>showFirstTopic (in category 'actions') -----
+ showFirstTopic
+ "Shows the first topic that has contents."
+
+ self showTopicThat: [:topic | topic contents notEmpty].!

Item was added:
+ ----- Method: HelpBrowser>>showTopicThat: (in category 'actions') -----
+ showTopicThat: block
+
+ self
+ detect: [:topic | block value: topic]
+ ifFound: [:topic :path | self currentTopicPath: path, {topic}].!