[squeak-dev] Opening two debuggers in a single doit

Chris Cunningham cunningham.cb at gmail.com
Thu Jan 25 00:57:20 UTC 2018


On Wed, Jan 24, 2018 at 4:35 PM, Chris Cunningham <cunningham.cb at gmail.com>
wrote:

>
>
> On Wed, Jan 24, 2018 at 4:31 PM, tim Rowledge <tim at rowledge.org> wrote:
>
>>
>> > On 24-01-2018, at 4:25 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>> >
>> > Hold your horses :D
>> > It _is_ sent, indirectly, via:
>> >
>> > openContext: aContext label: aString contents: contentsStringOrNil
>> >       "Open a notifier in response to an error, halt, or notify. A
>> notifier view just shows a short view of the sender stack and provides a
>> menu that lets the user open a full debugger."
>> >
>> >       ^ Project current
>> >               dispatchTo: self
>> >               addPrefixAndSend: #OpenContext:label:contents:
>> >               withArguments: { aContext . aString . contentsStringOrNil
>> }
>> >
>> > Which, in turn, is also sent…
>>
>> Good grief. What an excellent way to confuse our tools. Most definitely
>> not a technique I’d ever suggest teaching.
>>
>> Nope.
>
> Now, how to fix the sendersOf to detect something pathological like this...
>
> cbc
>

This would work:

openContext: aContext label: aString contents: contentsStringOrNil
<calledMethods: #( morphicOpenContext:label:contents:
mvcOpenContext:label:contents: ) >
"Open a notifier in response to an error, halt, or notify. A notifier view
just shows a short view of the sender stack and provides a menu that lets
the user open a full debugger."

^ Project current
dispatchTo: self
addPrefixAndSend: #OpenContext:label:contents:
withArguments: { aContext . aString . contentsStringOrNil }

Then, also do this for the other siblings like this, as found in Project
class>baseSelectors

baseSelectors
"The list of known base selectors that may be dispatched to project specific
implementations. For example, #OpenLabel:in: will be dispatched to
#mvcOpenLabel:in:
for its MVC specific implementation. Add new base selectors here if
additional methods
are added as targets of the dispatchTo:addPrefixAndSend:withArguments:
mechanism."

^ {
#StartUpLeftFlush .
#StartUpWithCaption:icon:at:allowKeyboard: .
#OpenLabel:in: .
#Open: .
#Open .
#OpenOn:context:label:contents:fullView: .
#ResumeProcess:
}

Downside (well, one of them) is that additional project classes are added,
you'd need to then update the methods.  And remember to add in these funky
messages as well, obviously.

cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180124/57efaea5/attachment.html>


More information about the Squeak-dev mailing list