On 18-06-15 13:35, Damien Cassou wrote:
Stephan Eggermont <stephan@stack.nl> writes:
ApplicationTreeModelAdapter>>childrenFor: anObject ^mapping at: anObject
ApplicationTreeModelAdapter>>childrenFor: anObject ^(mapping at: anObject class) value: anObject
the same method with 2 different behaviors.
Hmm, still not awake yet? Note to self: do not program in a text editor. childrenFor: anObject | col name | ^ApplicationTreeModelAdapter sharedInstance childrenFor: anObject ApplicationTreeModelAdapter>>register: aOneParameterBlock at: aClass mapping at: aClass put: aOneParameterBlock ApplicationTreeModelAdapter>>childrenFor: anObject ^(mapping at: anObject class) value: anObject DMMindMap class>>registerChildren ApplicationTreeModelAdapter sharedInstance register: [:parent | ^OrderedCollection new] at: self DCDiagram class>>registerChildren ApplicationTreeModelAdapter sharedInstance register: [:parent | OrderedCollection withAll: parent nodes] and you could of course remove the ApplicationTreeModelAdapter sharedInstance register: part and use a pragma Stephan