Then you will have [ receiver strangeMessage ] on: Error do: [ receiver otherMessage on: Error do: [ self defaultFallback ] ]
^^ Ben On May 14, 2013, at 10:22 PM, stephane ducasse <stephane.duca...@free.fr> wrote: > agrh!!!! > I would vote against it because slowly we would get this plague in the system. > > Stef > > On May 14, 2013, at 5:35 PM, Benjamin <benjamin.vanryseghem.ph...@gmail.com> > wrote: > >> Something like >> >> self performIfExists: #blah >> >> would reduce the noise a lot :) >> Then in this methods, we do what we want ^^ >> >> Ben >> >> On May 14, 2013, at 5:32 PM, Frank Shearar <frank.shea...@gmail.com> wrote: >> >>> On 14 May 2013 16:21, Stéphane Ducasse <stephane.duca...@inria.fr> wrote: >>>> Hi >>>> >>>> I'm in favor killing all the respondsTo: >>>> >>>> acceptTextMorphs >>>> "Accept any text morphs except for those that have no edits." >>>> >>>> self allMorphs do: [:p | >>>> ((p respondsTo: #accept) and: [ >>>> (p respondsTo: #hasUnacceptedEdits) and: [ >>>> p hasUnacceptedEdits]]) ifTrue: [p accept]] >>> >>> They're a step up from #isKindOf:. It looks like you need is something >>> that says "does this object respond to a particular set of messages >>> (i.e., a Protocol)?". (No, Nicolas, I don't mean a message category! >>> :) ) >>> >>> But in this particular case the solution looks like making a >>> #insertADecentNameHere that particular classes of things can implement >>> as "^ self hasUnacceptedEdits ifTrue: [self accept]" >>> >>> frank >>> >> >