Randal L. Schwartz wrote:
I've been taking my time to wrap my head around your comment. It makes complete sense when thinking about the use of the object model. However (if you can refer to the attached diagram showing one association and one inheritance relationship) what I am trying to work out is whether that applies as strongly one level up at the meta / class description."Ben" == Ben Coman <b...@openinworld.com> writes:Ben> doh! <smacks-head> funny how it works itself out when you step away for a Ben> while - this works fine...Ben> B class >> relations Ben> (self == B) Ben> ifTrue: [ ^ { E-> #addE. } ] Ben> ifFalse: [ ^ {} ] Ben> but I still wonder if it is the right approach Without further analysis, or description of the problem you're trying to solve, this already looks far too fragile for me. For one, it fails the "null subclass" test. You should always be able to subclass a class, putting no methods in the subclass, and the subclass and superclass objects would be completely interchangeable. If ConductingEquipment is a null-subclass then at the instance/model level it could be completely interchanged with Equipment because the association is inherited. However at the meta / class-description level (ie storing the data to be able to redraw that diagram) ConductingEquipment and Equipment seem not interchangable since no direct line exists between ConductingEquipment to EquipmentContainer. I'll continue to muse on that. Thanks for you reply. cheers -ben |
<<inline: aRelation.png>>
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners