<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Ralph,<div><br></div><div>it is a good thing that you find it obvious in retrospect. Now, you can move on and learn more about Morphic event handling. :-)</div><div><br></div><div>Set a breakpoint in you button's #mouseDown:, and then take a look at the debugger's stack. Some calls are closer to the Morphic main loop, some are closer to your application code. :) Here is an illustration:</div><div><br></div><div><img src="cid:f9e0badc-a31c-4169-a409-31e6bee6b4e3" width="auto" style="width: 421px; height: 632px;"></img></div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" 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: #AAAAAA; margin-top: 10px;">Am 26.10.2017 09:19:17 schrieb Ralph Boland <rpboland@gmail.com>:</p>Found/fixed problem:  When my morph containing a collection of my<br>button morphs was resized the icons (forms) were<br>resized but not the buttons.  So you were right.  Oddly enough the<br>containing morph knew how big each button was supposed<br>to be so it allocated enough screen space for each button.  I thought<br>it was resizing the buttons too but I was wrong.<br>In other places I did resize my button morphs when needed so in those<br>instances it (of course) worked all along.<br><br>>  Hi Ralph,<br><br>>  can you file-out and share your version of the IconicButton class?<br><br>I could but to you wouldn't have found the problem there because the<br>way the code is written it is the responsibility<br>of the code delivering the new icon/form to the button that is<br>responsible for changing the button's extent.<br>I suppose I could pass the icon/form and the new extent to the button<br>together and let it be responsible for the changes.<br>I'll think about it.<br><br>Morph >> #handleEvent: is too low-level for your use case. You should<br>only overwrite/implement #handlesMouseDown: and #mouseDown:, for<br>example.<br><br>my button class implemented #handleEvent only to set a breakpoint.  I<br>assume you mean that I should have instead<br>did the same with #mouseDown:  I will give this a try and see if it<br>avoids my getting the emergency window.<br><br>I had no idea that  #handleEvent is lower level than  #mouseDown:.<br>Is there a place that I can learn things like this?<br>Squeak seems to provide little documentation here (as elsewhere).<br>It is definitely a trial by fire for me to figure all this GUI stuff out.<br>I have little knowledge/interest in GUIs but need to know this since<br>I am developing some children's educational software in Squeak.<br><br>> Seems to me that the icon in your button is bigger than your button.<br>> Only the button/owner gets the events here.<br><br>YOU WERE RIGHT.  This is what I did wrong.<br>I knew that it is the button that gets the events; just failed to<br>resize the button.<br><br><br>> ...<br><br><br>> Best,<br>> Marcel<br><br>Thanks.  In retrospect this looks pretty obvious.  :(<br><br>Ralph<br><br>--------------------------------Original<br>message--------------------------------------------------<br><br>Am 25.10.2017 05:58:10 schrieb Ralph Boland <rpboland@gmail.com>:<br>I created a button class which is version of IconicButton<br>(by cutting and pasting) that does extra things that I need.<br>One of the things that I do is expand the size of my button<br>(actually a collection of my buttons) when running an application that uses it.<br>When I do so only a small area of near the top left corner of my<br>button seems to have focus<br>so then if I click on that area the button works but otherwise it does not.<br><br>When I click within my botton's working area >handleEvent:<br>anEvent> is called by<br>>processMouseOver: anEvent>.<br><br>When my button does not work the method is not called<br>because, I believe, the portion of my button that was clicked does<br>not have focus.<br>Note that when my button size is expanded it's position is also changed because<br>other morphs have also expanded but this expansion does not seems to<br>cause confusion<br>as to where the button is because the working focus area<br>remains in the same part of my button.<br>But there appears to be confusion as to the size of my button and its<br>focus area.<br><br>Debugging this is a pain. When I set a break point in<br>>handleEvent: anEvent><br>the emergency handler pops up. when I do a I get my stack with<br>>handleEvent: anEvent> at the top of the stack.<br>But I have gathered little useful information by looking at this stack.<br>The only solution I can think of is to discard by button (buttons)<br>and reinstantiate them every time they need to be resized.<br><br>Is there something that I should be setting when I resize my button so<br>that it's focus area<br>is correct?<br><br>Is discarding my buttons and reinsantiating them the only solution?<br><br>Any help or insight appreciated.<br><br>Ralph Boland<br>_______________________________________________<br>Beginners mailing list<br>Beginners@lists.squeakfoundation.org<br>http://lists.squeakfoundation.org/mailman/listinfo/beginners<br></rpboland@gmail.com>
                        </blockquote></div>