A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.934.mcz ==================== Summary ==================== Name: Collections-ct.934 Author: ct Time: 12 April 2021, 10:11:41.51069 pm UUID: 84f5a3d9-3316-fd46-b89b-2fb0d2b625ef Ancestors: Collections-nice.933 Improves multilingual support for errors in collections. =============== Diff against Collections-nice.933 =============== Item was changed: ----- Method: Collection>>errorDifferentSize (in category 'private') ----- errorDifferentSize + ^ self error: 'Other collection must be the same size' translated! - self error: 'otherCollection must be the same size'! Item was changed: ----- Method: Collection>>errorEmptyCollection (in category 'private') ----- errorEmptyCollection + ^ self error: 'This collection is empty' translated! - self error: 'this collection is empty'! Item was changed: ----- Method: Collection>>errorNoMatch (in category 'private') ----- errorNoMatch + ^ self error: 'Collection sizes do not match' translated! - self error: 'collection sizes do not match'! Item was added: + ----- Method: Collection>>name (in category 'printing') ----- + name + + ^ String streamContents: [:stream | + self printNameOn: stream]! Item was changed: ----- Method: Dictionary>>errorValueNotFound (in category 'private') ----- errorValueNotFound + ^ self error: 'Value not found' translated! - self error: 'value not found'! Item was changed: ----- Method: HashedCollection>>errorNoFreeSpace (in category 'private') ----- errorNoFreeSpace + ^ self error: 'There is no free space in this collection!!' translated! - self error: 'There is no free space in this collection!!'! Item was changed: ----- Method: KeyNotFound>>messageText (in category 'accessing') ----- messageText + + ^ messageText ifNil: ['Key not found: {1}' translated format: {self key}]! - "Return a textual description of the exception." - ^messageText ifNil:['Key not found: ', key]! Item was changed: ----- Method: NotFound>>messageText (in category 'accessing') ----- messageText + + ^ messageText ifNil: ['Object is not in the collection.' translated]! - "Return a textual description of the exception." - ^messageText ifNil:['Object is not in the collection.']! Item was changed: ----- Method: OrderedCollection>>errorNoSuchElement (in category 'private') ----- errorNoSuchElement + ^ self error: ('Attempt to index a non-existent element in {1}' translated format: {self name})! - self error: (String streamContents: [ :stream | - stream nextPutAll: 'attempt to index a non-existent element in '. - self printNameOn: stream ])! Item was changed: ----- Method: OrderedCollection>>errorNotEnoughElements (in category 'private') ----- errorNotEnoughElements + ^ self error: ('Attempt to remove more elements than possible from {1}' translated format: {self name})! - self error: (String streamContents: [ :stream | - stream nextPutAll: 'attempt to remove more elements than possible from '. - self printNameOn: stream ])! Item was changed: ----- Method: SequenceableCollection>>errorFirstObject: (in category 'private') ----- errorFirstObject: anObject + + ^ self error: 'Specified object is first object' translated! - self error: 'specified object is first object'! Item was changed: ----- Method: SequenceableCollection>>errorLastObject: (in category 'private') ----- errorLastObject: anObject + + ^ self error: 'Specified object is last object' translated! - self error: 'specified object is last object'! Item was changed: ----- Method: SequenceableCollection>>errorOutOfBounds (in category 'private') ----- errorOutOfBounds + ^ self error: 'Indices are out of bounds' translated! - self error: 'indices are out of bounds'! |
Free forum by Nabble | Edit this page |