--- a/ResourcePack.st Sat Feb 21 17:41:07 2004 +0100
+++ b/ResourcePack.st Sun Feb 22 16:40:27 2004 +0100
@@ -197,11 +197,30 @@
"get the full resource definitions for aClass (i.e. with super packs).
Also leave the resulting pack in the cache for faster access next time."
+ ^ self for:aClass cached:true
+
+ "
+ ResourcePack for:TextView
+ ResourcePack for:CodeView
+ ResourcePack for:Workspace
+ ResourcePack for:View
+ ResourcePack for:ErrorLogger
+ ResourcePack for:NewLauncher
+ Workspace classResources
+ "
+!
+
+for:aClass cached:cached
+ "get the full resource definitions for aClass (i.e. with super packs).
+ Also leave the resulting pack in the cache for faster access next time."
+
|nm pack rsrcDir baseName|
nm := aClass resourcePackName.
- pack := self searchCacheFor:nm.
- pack notNil ifTrue:[^ pack].
+ cached ifTrue:[
+ pack := self searchCacheFor:nm.
+ pack notNil ifTrue:[^ pack].
+ ].
baseName := (Smalltalk fileNameForClass:nm) , '.rs'.
rsrcDir := aClass resourceDirectory.
@@ -217,7 +236,9 @@
pack superPack:(self for:(aClass superclass)).
].
pack packsClassName:nm.
- self addToCache:pack.
+ cached ifTrue:[
+ self addToCache:pack.
+ ].
^ pack
"
@@ -918,7 +939,7 @@
!ResourcePack class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.86 2004-02-20 18:47:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.87 2004-02-22 15:40:27 cg Exp $'
! !
ResourcePack initialize!