Weird behaviour in desktop application

Hello

While my desktop app (Win, Mac, Linux) is getting bigger I found some weird behaviours:

  • Windows: Change event on Combobox does not fire when text was manually entered and Combobox was left. Choosing an entry from the predefined list is still working (trigger fires). When leaving the changed field with TAB I hear a short “blocking” sound, no sound when pressing RETURN key. I have several windows and no matter where I create a Combobox I have everywhere this effect.
  • Mac: cmd+C (copy) and cmd+V (paste) not working in any text related field, both with short blocking sound.

→ Xojo 2020, Release 2.1

Any ideas what could all cause this?

Are you able to replicate this in a simple demo project that you can upload?

  • Windows: Change event on Combobox does not fire when text was manually entered and Combobox was left. Choosing an entry from the predefined list is still working (trigger fires). When leaving the changed field with TAB I hear a short “blocking” sound, no sound when pressing RETURN key. I have several windows and no matter where I create a Combobox I have everywhere this effect.

It seems like you want the TextChanged ComboBox.TextChanged - Xojo Documentation event
to check if the user has typed something. Use the Change event PopupMenu.Change - Xojo Documentation to detect if the user has changed the selected item.

  • Mac: cmd+C (copy) and cmd+V (paste) not working in any text related field, both with short blocking sound.

These only work if you implemented the menu items for it. Check if your menu is set and if it has these items, otherwise add them.

Thank you for the ansers…

Combobox: I am already using the CHANGE even that should fire on leaving the combobox, I’m not the TEXTCHANGED event. It works on the Mac side, not on the Windows side.

Copy/paste: I have a menu with short keys in the app but I made sure the cmd+C and cmd+V are not occupied that way. Aaah, you mean I must add those commands ALSO also as menu items! Good point, will try out, thanks!
→ But it’s weird it works without menu entries on Windows but not on Mac.

That’s a good question. For the time being I’m not able to reproduce in a much more simpler app. This will cost me a lot of time to fiddle out where/in what constellation this problem occurs. When time is given I will give it a try, thank you!

If you can’t reproduce it easily on a simple project then all I can suggest it see what events you have on the ComboBox and breakpoint them all, step through until you hear the Beep so you can find out what is causing it/when its happening as this isn’t standard windows behaviour and is probably a result of your code. Also check any Super’s for forgotten code. Good luck :smiley:

The lack of Change event firing if you happen to type the exact word from the drop down list I’d consider a bug as the next time you visit the control the new entry is selected. I’ve just had a quick play around with the control and I’ve spotted a few problems with it that I’ll make feedback tickets for.

This bug is there for years and never got fixed. Just add a KeyDown event instead when you use a Combobox when compiling for Windows.

Ouch… Ok thanks for the clear answer. Let’s hope Xojo might fix it in the next years… :confused:
It’s weird but you offered the right “solution”…

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.