-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
semantics: add missing dictionary method
- Loading branch information
Showing
5 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...lkExtras-Semantics.package/Dictionary.extension/instance/talkSemanticWithValuesSorted..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*SqueakInboxTalkExtras-Semantics-Core-sorting | ||
talkSemanticWithValuesSorted: aSortBlockOrNil | ||
|
||
| sorted | | ||
sorted := OrderedDictionary new: self size. | ||
(self associations sorted: | ||
(aSortBlockOrNil | ||
ifNil: [[:someAssoc :otherAssoc | someAssoc value <= otherAssoc value]] | ||
ifNotNil: [[:someAssoc :otherAssoc | aSortBlockOrNil value: someAssoc value value: otherAssoc value]])) | ||
do: [:assoc | | ||
sorted add: assoc]. | ||
^ sorted |
5 changes: 5 additions & 0 deletions
5
packages/SqueakInboxTalkExtras-Semantics.package/Dictionary.extension/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"talkSemanticWithValuesSorted:" : "ct 6/20/2024 01:06" } } |
2 changes: 2 additions & 0 deletions
2
packages/SqueakInboxTalkExtras-Semantics.package/Dictionary.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Dictionary" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters