Eyesee-Core(AndrewHora.100) extends Dictionary to add class method
#keys:values:
Here is the outline...
---
| dict |
dict := Dictionary new.
...
^dict
---
So if I have [ Dictionary subclass:
LEKImportedEnterpriseArchitectPackage ]
then [ x := LEKImportedEnterpriseArchitectPackage keys: { #a . #b }
values: { 1 . 2 } ]
ends up with 'x' containing a Dictionary rather than a
LEKImportedEnterpriseArchitectPackage.
Is that a defect or by design ?
I know there is some philosophy about avoiding subclassing collection
classes so that they are used more "HAS A" rather than "IS A", but I'm
not completely clear on that. My purpose is fairly simple providing a
temporary staging point for records that I read in from a DBF file
which I want to extract into my application format, to which I adding
some convenience methods just to simply the import code.
For example, there is no more logic in
LEKImportedEnterpriseArchitectPackage besides getter methods like...
---
packageID
^ self at:
‘Package_ID’
---
_primaryKey
^ self
packageID
---
cheers -ben