#REFACTORING by exept
class: ApplicationModel
comment/format in: #showMeHowItWorks:
changed: #showMeHowItWorks:inAny:
--- a/ApplicationModel.st Fri Oct 18 23:19:22 2019 +0200
+++ b/ApplicationModel.st Sun Oct 20 10:59:26 2019 +0200
@@ -2934,7 +2934,7 @@
!
showMeHowItWorks:minorKey
- "present the default show, from a file named <majorKey>_<minorKey>_<lang>.show.
+ "present the show, from a file named <majorKey>_<minorKey>_<lang>.show.
Usually, the major key defaults to the classes name,
and the minor key is often emptyOrNil, if there is only one show."
@@ -2954,7 +2954,7 @@
This is controlled by a spec, which is read from the resources/shows folder,
and is named <appClassName>_<lang>.show"
- |fn rsrcDir spec|
+ |fn rsrcDir|
rsrcDir := self class packageDirectory asFilename / 'resources' / 'shows'.
(rsrcDir exists) ifFalse:[
@@ -2977,13 +2977,10 @@
triedFn := fn,rest.
(rsrcDir / triedFn) exists ifTrue:[
- (rsrcDir / triedFn) readingFileWithEncoding:#utf8 do:[:s |
- spec := Array readFrom:s.
- ].
ShowMeHowItWorks new
application:self;
language:lang;
- do:spec.
+ doShowFile:(rsrcDir / triedFn).
^ self
]
].