class: ResourcePack
authorClaus Gittinger <cg@exept.de>
Fri, 04 Sep 2015 11:34:43 +0200
changeset 6909 e3e7a1e51bc7
parent 6907 94dbd3782c96
child 6910 222a3a9c372d
child 6911 b7e5e48b5c0a
class: ResourcePack changed: #for:cached:
ResourcePack.st
--- a/ResourcePack.st	Tue Sep 01 18:44:23 2015 +0200
+++ b/ResourcePack.st	Fri Sep 04 11:34:43 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -85,7 +83,7 @@
     all those strings. (find the keys by looking at users of resource or senders
     of 'string:*').
     Notice, that the grammar of different languages may imply a reordering,
-    so the above string becomes the german 'wollen Sie %1 wirklich löschen';
+    so the above string becomes the german 'wollen Sie %1 wirklich löschen';
     so using percent-placeholders is much better than simple concatenations of
     arguments to the question.
 
@@ -249,8 +247,8 @@
 
     nm := aClass resourcePackName.
     cached ifTrue:[
-	pack := self searchCacheFor:nm.
-	pack notNil ifTrue:[^ pack].
+        pack := self searchCacheFor:nm.
+        pack notNil ifTrue:[^ pack].
     ].
 
     baseName := (Smalltalk fileNameForClass:nm) , '.rs'.
@@ -263,23 +261,23 @@
 "/    ].
 
     rsrcDir notNil ifTrue:[
-	pack := self new.
-	rsrcDir exists ifTrue:[
-	    (rsrcDir construct:baseName) exists ifTrue:[
-		pack := self fromFile:baseName directory:(rsrcDir name) cached:true.
-	    ].
-	]
+        pack := self new.
+        rsrcDir exists ifTrue:[
+            (rsrcDir construct:baseName) exists ifTrue:[
+                pack := self fromFile:baseName directory:(rsrcDir name) cached:cached.
+            ].
+        ]
     ] ifFalse:[
-	pack := self fromFile:baseName directory:'resources' cached:true.
+        pack := self fromFile:baseName directory:'resources' cached:cached.
     ].
     aClass superclass notNil ifTrue:[
-	pack superPack:(self for:(aClass superclass)).
+        pack superPack:(self for:(aClass superclass)).
     ].
     pack packsClassOrFileName:nm.
     cached ifTrue:[
-	self addToCache:pack.
+        self addToCache:pack.
     ].
-    pack projectPack:(self forPackage:(aClass resourcePackage) cached:true).
+    pack projectPack:(self forPackage:(aClass resourcePackage) cached:cached).
     ^ pack
 
     "