optionMenu in nested MVC buttons not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

optionMenu in nested MVC buttons not working

Christoph Thiede

Hi all,


I experimented a bit with the backward compatibility of MVC buttons and found out that menus were broken in them. The attached changeset fixes this. However, you cannot invoke a menu on a button that is nested into another view. Please find the attached example.

I already found out that in PluggableButtonController >> #isControlWanted, sensor anyButtonPressed returns false when it should return true. Crazily, the bug does not occur when having a transcript open and logging things to it directly before the sensor call.

As a side effect, if you enable both buttons in the debug code parallelly, regular clicks on the unnested button won't work at all. I have no idea why is this.


Any help and tips would be great! :-)


Best,

Christoph




CTDebugModel.st (1K) Download Attachment
PluggableButtonController-optionalMenu-fixes.1.cs (1K) Download Attachment
Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: optionMenu in nested MVC buttons not working

Christoph Thiede

I just updated the debugging code for understandability. You can build it by doing:

ToolBuilder open: CTDebugModel.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Samstag, 5. September 2020 01:13:57
An: Squeak Dev
Betreff: [squeak-dev] optionMenu in nested MVC buttons not working
 

Hi all,


I experimented a bit with the backward compatibility of MVC buttons and found out that menus were broken in them. The attached changeset fixes this. However, you cannot invoke a menu on a button that is nested into another view. Please find the attached example.

I already found out that in PluggableButtonController >> #isControlWanted, sensor anyButtonPressed returns false when it should return true. Crazily, the bug does not occur when having a transcript open and logging things to it directly before the sensor call.

As a side effect, if you enable both buttons in the debug code parallelly, regular clicks on the unnested button won't work at all. I have no idea why is this.


Any help and tips would be great! :-)


Best,

Christoph




CTDebugModel.st (1K) Download Attachment
Carpe Squeak!