<div dir="ltr">Thank you Tom and Marcel for your assistance :) I had seen something involving signals in the Explorer, but didn't realize it wasn't part of stock Morphic.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 11, 2022 at 4:12 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id="gmail-m_457971144157106474__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">
                                        Hi David --<div><br></div><div>Yes, as Tom explained, UiPushButton is part of the Widgets project [1], which builds upon the Signals project [2].</div><div><br></div><div>Use #connect:signal:toSelector: insteand of #on:send:to: See [2] for more information.</div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div>[1] <a href="https://github.com/hpi-swa/widgets" target="_blank">https://github.com/hpi-swa/widgets</a></div><div><div>[2] <a href="https://github.com/hpi-swa/signals" target="_blank">https://github.com/hpi-swa/signals</a></div><div><br></div></div><div></div>
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 11.01.2022 08:12:50 schrieb Tom Beckmann <<a href="mailto:tomjonabc@gmail.com" target="_blank">tomjonabc@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div>The widgets toolkit to which UiPushButton belongs uses a custom event mechanism called signals. You can find the place where #on:send:to is "disabled" here: <a href="https://github.com/hpi-swa/widgets/blob/master/repository/Widgets.package/UiButton.class/instance/initializeEventHandler.st" target="_blank">https://github.com/hpi-swa/widgets/blob/master/repository/Widgets.package/UiButton.class/instance/initializeEventHandler.st</a></div><div><br></div><div>This is the package that UiPushButton uses to dispatch messages instead: <a href="https://github.com/hpi-swa/signals" target="_blank">https://github.com/hpi-swa/signals</a> I believe the signal you're looking for should be called #pressed then: <a href="https://github.com/hpi-swa/widgets/blob/master/repository/Widgets.package/UiButton.class/instance/pressed.st" target="_blank">https://github.com/hpi-swa/widgets/blob/master/repository/Widgets.package/UiButton.class/instance/pressed.st</a></div><div><br></div><div>---<br></div><div><br></div><div>Maybe as a debugging strategy (that I haven't tried myself with this instance because I already the above suspicion), one way you *probably* could have found this out yourself would have been by overriding the mouseDown: method in UiPushButton, put a `self halt` at the top and have it call `super mouseDown:`. Admittedly, you would likely have wound up with quite a number of indirections (which may not be entirely clear unless you're deep in Morphic event lingo) until you would have eventually found that the events are being delegated to this Event Handler object that calls methods from the "signals" package.</div><div><br></div><div>How would you have known to override mouseDown:? Since UiPushButton is a Morph, it must still follow the Morphic event dispatching rules. Searching for "mouse" in the Morph methods should give you a couple that seem promising, and eventually you'd probably have hit the one that triggers a halt at the right moment :)</div><div><br></div><div>Not sure if this was actually helpful but I often find it quite interesting what sort of strategies people follow when debugging things, so I thought I'd give it a try :D <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 11, 2022 at 4:52 AM David O'Toole <<a href="mailto:deeteeoh1138@gmail.com" target="_blank">deeteeoh1138@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;min-width:500px"><div dir="ltr">I cannot get UiPushButton>>#on:send:to: working; using on: #click it gives no error, but events are never sent. When I substitute an SBButton from Sandblocks, it works. Am I using the wrong selector with UiPushButton? Or perhaps I am missing something else? I would greatly appreciate any help you could offer in troubleshooting. </div>
<br>
</blockquote></div>
</div></blockquote></div><br>
</blockquote></div>