The Trunk: SMBase-ar.98.mcz

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

The Trunk: SMBase-ar.98.mcz

commits-2
Andreas Raab uploaded a new version of SMBase to project The Trunk:
http://source.squeak.org/trunk/SMBase-ar.98.mcz

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

Name: SMBase-ar.98
Author: ar
Time: 5 March 2010, 9:02:36.615 pm
UUID: bd3234c5-e27c-e84d-9abb-5117a9a88895
Ancestors: SMBase-nice.97

Avoid dictionary protocol in Smalltalk.

=============== Diff against SMBase-nice.97 ===============

Item was changed:
  ----- Method: SMDVSInstaller classSide>>canInstall: (in category 'testing') -----
  canInstall: aPackage
  "Can I install this? First we check if class StreamPackageLoader
  is available, otherwise DVS isn't installed.
  Then we check if the package is categorized with package
  format DVS - currently we have hardcoded the id of that category."
 
 
+ Smalltalk at: #StreamPackageLoader ifPresent: [ :loader | | fileName |
- Smalltalk at: #StreamPackageLoader ifPresentAndInMemory: [ :loader | | fileName |
  fileName := aPackage downloadFileName.
  fileName ifNil: [^false].
  fileName := fileName asLowercase.
  ^((fileName endsWith: '.st') or: [fileName endsWith: '.st.gz'])
  and: [aPackage categories includes: "The DVS format category"
  (SMSqueakMap default
  categoryWithId: 'b02f51f4-25b4-4117-9b65-f346215a8e41')]].
  ^false!

Item was changed:
  ----- Method: SMSARInstaller>>fileIn (in category 'private') -----
  fileIn
 
+ Smalltalk at: #SARInstaller ifPresent: [:installer |
- Smalltalk at: #SARInstaller ifPresentAndInMemory: [:installer |
  (installer directory: dir fileName: fileName) fileIn. ^self].
  self error: 'SAR support not installed in image, can not install.'!

Item was changed:
  ----- Method: SMInstaller classSide>>changeSetNamed: (in category 'changeset utilities') -----
  changeSetNamed: newName
  "This method copied here to ensure SqueakMap is independent of ChangesOrganizer."
 
+ Smalltalk at: #ChangesOrganizer ifPresent: [ :cs | ^cs changeSetNamed: newName ].
- Smalltalk at: #ChangesOrganizer ifPresentAndInMemory: [ :cs | ^cs changeSetNamed: newName ].
  ^ChangeSet allInstances detect: [ :cs | cs name = newName ] ifNone: [ nil ].!

Item was changed:
  ----- Method: SMInstaller classSide>>basicNewChangeSet: (in category 'changeset utilities') -----
  basicNewChangeSet: newName
  "This method copied here to ensure SqueakMap is independent of
  ChangesOrganizer. "
  Smalltalk
  at: #ChangesOrganizer
+ ifPresent: [:cs | ^ cs basicNewChangeSet: newName].
- ifPresentAndInMemory: [:cs | ^ cs basicNewChangeSet: newName].
  (self changeSetNamed: newName)
  ifNotNil: [self error: 'The name ' , newName , ' is already used'].
  ^ ChangeSet basicNewNamed: newName!

Item was changed:
  ----- Method: SMSARInstaller classSide>>canInstall: (in category 'testing') -----
  canInstall: aPackage
  "Answer if this class can install the package.
  We handle it if the filename has the extension
  .sar (upper and lowercase) and SARInstaller is
  present in the image to handle the install."
 
  | fileName |
  fileName := aPackage downloadFileName.
  fileName ifNil: [^false].
+ Smalltalk at: #SARInstaller ifPresent: [ :installer |
- Smalltalk at: #SARInstaller ifPresentAndInMemory: [ :installer |
  ^'sar' = (FileDirectory extensionFor: fileName) asLowercase].
  ^false!