ResourcePack.st
changeset 1078 f7b6f15899ab
parent 1042 ddb262303ccd
child 1173 86a212598655
equal deleted inserted replaced
1077:f06cffd904c1 1078:f7b6f15899ab
   238 addToCache:aPack
   238 addToCache:aPack
   239     |idx|
   239     |idx|
   240 
   240 
   241     idx := Packs identityIndexOf:nil.
   241     idx := Packs identityIndexOf:nil.
   242     idx == 0 ifTrue:[
   242     idx == 0 ifTrue:[
       
   243 	idx := Packs identityIndexOf:0
       
   244     ].
       
   245     idx == 0 ifTrue:[
   243 	"
   246 	"
   244 	 throw away oldest
   247 	 throw away oldest
   245 	"
   248 	"
   246 	idx := Packs size.
   249 	idx := Packs size.
   247 	Packs replaceFrom:1 to:idx-1 with:Packs startingAt:2.
   250 	Packs replaceFrom:1 to:idx-1 with:Packs startingAt:2.
   260     sz := Packs size.
   263     sz := Packs size.
   261     1 to:sz do:[:idx |
   264     1 to:sz do:[:idx |
   262 	|aPack|
   265 	|aPack|
   263 
   266 
   264 	aPack := Packs at:idx.
   267 	aPack := Packs at:idx.
   265 	aPack notNil ifTrue:[
   268 	(aPack notNil 
       
   269 	and:[aPack ~~ 0]) ifTrue:[
   266 	    aClassname = aPack packsClassName ifTrue:[
   270 	    aClassname = aPack packsClassName ifTrue:[
   267 		"
   271 		"
   268 		 bring to end for LRU
   272 		 bring to end for LRU
   269 		"
   273 		"
   270 		Packs replaceFrom:idx to:sz-1 with:Packs startingAt:idx+1.
   274 		Packs replaceFrom:idx to:sz-1 with:Packs startingAt:idx+1.
   573 ! !
   577 ! !
   574 
   578 
   575 !ResourcePack  class methodsFor:'documentation'!
   579 !ResourcePack  class methodsFor:'documentation'!
   576 
   580 
   577 version
   581 version
   578     ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.36 1996-09-09 16:58:15 cg Exp $'
   582     ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.37 1996-10-18 12:36:43 cg Exp $'
   579 ! !
   583 ! !
   580 ResourcePack initialize!
   584 ResourcePack initialize!