Author Topic: Dialog event context()..  (Read 71 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1407
  • Hero Points: 107
  • Text
Dialog event context()..
« on: October 11, 2017, 05:48:07 pm »
I noticed in many dialogs the context key on the keyboard doesn't work, yet right-click will open the context menu.

I found this in builtins.e
Code: [Select]
form_event context(),             _sc_lang_control::context();                  const menu_event CONTEXT;
Sure enough, if I add
Code: [Select]
void _tbfind_form.context()
{
   say("CONTEXT");
}
To TBFind, then the context key works.

So why do most dialogs implement the context menu with rbutton_up() instead of context()?


One dialog I found that does implement it, template manager, has a bug.
When focus is on the Categories box, click the context key on the keyboard and you get this:
Code: [Select]
---------------------------
Slick-C Error
---------------------------
Control -ctTemplateManager-CategoryTree-etab referenced but does not exist

file=ctmanager.ex offset=4462
---------------------------
OK   
---------------------------

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3951
  • Hero Points: 256
Re: Dialog event context()..
« Reply #1 on: October 11, 2017, 05:53:17 pm »
We run into some qt portability problems due to bad implementation. I think qt could have done this better. It’s been quite the struggle to get the context menu stuff just to work at all.

Qt handles the context menu differently for each platform (macOS, Linux/Unix, Windows) . We have to hide that fact.
« Last Edit: October 12, 2017, 04:29:10 pm by Clark »