[squeak-dev] How to catch #inform: messages?
Igor Stasenko
siguctua at gmail.com
Tue Mar 4 12:22:49 UTC 2008
On 04/03/2008, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> On Mar 4, 2008, at 8:59 , Igor Stasenko wrote:
>
> > or even you may try the same, but without need in creating a class:
> >
> > oldMethod := MorphicUIManager methodDictionary at: #inform:
> > MorphicUIManager compileSilently: 'inform: aMessage "do nothing"'
> > classified: 'dumb'.
> >
> > .. run your code..
> >
> > MorpicUIManager addSelectorSilently: #inform: withMethod: oldMethod
>
>
> How utterly evil ;)
>
> You would at least have to use an #ensure: block. And also you would
> need to verify that the code did not actually compile a new version
> of #inform.
>
> A less evil way would be to make #inform: use a Notification that
> could be handled to suppress the UI.
>
Hehe, just a snippet to show a direction without much care of details :)
>
> - Bert -
>
>
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|