On Jul 28, 2011, at 11:04 31PM, Stéphane Ducasse wrote:
just for education purpose.... yes it was like that
delete model isMorphicModel ifFalse: [^ super delete]. slotName ifNotNil: [(self confirm: 'Shall I remove the slot "' translated , slotName , '"\along with all associated methods?' withCRs translated) ifTrue: [(model class selectors select: [:s | s beginsWith: slotName]) do: [:s | model class removeSelector: s]. (model class instVarNames includes: slotName) ifTrue: [model class removeInstVarNamed: slotName]] ifFalse: [(self confirm: '...but should I at least dismiss this morph?' translated , ('\' , 'Choose "No" to leave everything unchanged' translated) withCRs) ifFalse: [^ self]]]. super delete
and we turn it into
delete model isMorphicModel ifFalse: [^ super delete].
instead of
delete model isMorphicModel ifFalse: [^ super delete]. super delete
-> deleting delete
Really? That logic makes even less sense! "If it's not something, do supers implementation. Else, do super behaviour" Sounds like you could just delete the method instead, imho :P Or does super delete return something other than self, and senders rely on this being different if we're a model or not? Would be really, really, really weird :) Cheers, Henry