[SOLVED]: 2018r1 : right-click or ctrl-click no longer fire cell-click in my app

Version 2018r1 broke my app in a way that right-clicks or ctrl-clicks are no longer triggering the cell-click event (where I construct a contextual menu).
What I see is that the EnableMenuItems event-handler is fired and then nothing after that.

I will investigate further tomorrow morning. At the moment I have not yet been able to reproduce this in an independent, new project.

But what used to work for several years, now just broke. Yuck.

This really never should have caused a click. This has been fixed and now you properly get the construct contextual menu event raised.

Does it behave the same way in 2017r3? We believe the change is in that version.

I believe that the cell-click event was used in order to overcome the situation where we needed a context menu appear over a multi selected listbox, without loosing that multi-selection.

And this evening I did put a breakpoint into the contextual menu event and it never occurred.

But I will investigate further tomorrow morning.

Thank you for the reply!

You can put your contextual-menu-generating code in the MouseDown event and use IsContextualClick to differentiate from normal clicks. This method does not change the listbox selection.

Yes, and then with rowfromxy and columnfromxy one can get the cell, if necessary.

Just more code for another workaround where the actual problem (loss of multi-selection) was discussed already in the old realbasic forum and where TT Tempelmann showed us then on how to solve that.

I think half of the coding time I have spent is for fixing already working code which breaks with new Xojo releases. What used to be correct and perfectly legal is suddenly declared as „all wrong“, „bad coding“ and the like. Sometimes I get frustrated… and I am not even talking yet about the Windows disaster.

I should do some paid work tomorrow, but I guess I have to fix the context menues and roll it out quickly.

Oliver, we fixed the multiselect bug a few versions back. If you comment out your workaround code and just use the built in events, I believe you’ll find that it all works now.

Thanks everyone who answered!

I apologize to the Xojo team: this one is completely my own fault! I recently broke my own code. I feel embarrassed.

None of us ever had that happening to us. Oh No, not us.
Never had the t-shirt either.
And anyways, you can’t prove anything. :wink:

[quote=383476:@Dirk Cleenwerck]None of us ever had that happening to us. Oh No, not us.
Never had the t-shirt either.
And anyways, you can’t prove anything. ;)[/quote]

unless I look in RevisionContorl and see the release notes/comments. :slight_smile:

That is nothing compared to the feeling when your own code becomes a riddle to you and you find yourself just wildly guessing when you try to solve a problem. I never had that experience and it did not take me weeks instead of days. I just read about it.

And for some strange reason, it’s always that one part that you didn’t bother to comment because it was so obvious when you wrote it.

In that case (if I really have trouble understanding my own code), I comment it, and I write another one (and I try not to re-use any part of the just cimmented code).
Sometimes, this does not takes long and sometimes the code is looking far better (with comments of course) than the original.

usually, when you look at the code a years ago and wonder why you did that… some code so embarrassing…

Never look back! Too dangerous!

Looking back at old code usually means I rewrite the whole project from scratch - even if it was working perfectly fine as it was!

Stupid perfectionism.

[quote=383708:@Markus Winter]Looking back at old code usually means I rewrite the whole project from scratch - even if it was working perfectly fine as it was!

Stupid perfectionism.[/quote]
You can always do better tomorrow, that which you finished today :slight_smile: .

That’s exactly the reason I never finished my very first Xojo project – that which got me glued to Xojo from beginning on. I must have started it about at least 5 times, as I could not endure the code I wrote 2 months ago. Xojo’s learning curve was too easy to follow, and I somewhat lost interest in another restart. There are still beta testers begging me to continue …