On 15 Aug 2015, at 12:56, Marcus Denker <marcus.denker@inria.fr> wrote:
Ok, what I will do first is to add the API to Variables + Packages using the propertyAt: format.
Done for Globals and ClassVariables: https://pharo.fogbugz.com/f/cases/16223/Property-API-for-Globals <https://pharo.fogbugz.com/f/cases/16223/Property-API-for-Globals> This works for both âClass Variableâ meta objects: (ClassVariableTest classVariableNamed: #TestVariable) propertyAt: #hello put: âyou'. and any Global in the âSmalltalk globalsâ: Object binding propertyAt: #hello put: âyou'. testPropertyAtPut | testValue classVariable | testValue := Date today. classVariable := self class classVariableNamed: #TestVariable. classVariable propertyAt: #testKeySelector put: testValue. self assert: (classVariable propertyAt: #testKeySelector) equals: testValue. TestVariable := 5. "of course changing the var does not change the property" self assert: (classVariable propertyAt: #testKeySelector) equals: testValue. classVariable removeProperty: #testKeySelector. self assert: classVariable properties isNil. Marcus