Re: [wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode
Hi John, I think this is a bug in wxwidgets, but I'm looking for suggestions about a workaround. ... This is on Win32 using wxwidgets 2.8.7. Thank you. Try these newer binaries: https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/ Thank you. Accelerator keys seem to be working in full screen with the new binaries, although I only did limited testing because of other problems (as described in the thread about the binaries). Paul. On Thu, Jun 28, 2012 at 10:27 PM, John Labenski jlaben...@gmail.com wrote: On Thu, Jun 28, 2012 at 1:50 AM, Paul K paulclin...@yahoo.com wrote: Hi John, I think this is a bug in wxwidgets, but I'm looking for suggestions about a workaround. ... This is on Win32 using wxwidgets 2.8.7. Thank you. Try these newer binaries: https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/ Personally, I don't use update ui events as they are sent a little too often for my likes. I find that a single function that updates the gui state, menus, toolbars, buttons, etc.. works very well and is less cpu intensive. All you have to do is call it whenever there is a chance the state will change. This also has the benefit of getting all the update code in one place since the state of various items are often interrelated. Regards, John -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users
Re: [wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode
On Thu, Jun 28, 2012 at 1:50 AM, Paul K paulclin...@yahoo.com wrote: Hi John, I think this is a bug in wxwidgets, but I'm looking for suggestions about a workaround. ... This is on Win32 using wxwidgets 2.8.7. Thank you. Try these newer binaries: https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/ Personally, I don't use update ui events as they are sent a little too often for my likes. I find that a single function that updates the gui state, menus, toolbars, buttons, etc.. works very well and is less cpu intensive. All you have to do is call it whenever there is a chance the state will change. This also has the benefit of getting all the update code in one place since the state of various items are often interrelated. Regards, John -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users
[wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode
Hi John, I think this is a bug in wxwidgets, but I'm looking for suggestions about a workaround. Essentially, if the application has menu items that change their state, the change in that state is not detected when the application is in full screen mode (and the menu is hidden). The same issue is described here (http://forums.wxwidgets.org/viewtopic.php?f=1t=32224) and this ticket may be related too (http://trac.wxwidgets.org/ticket/4843). I can see that UPDATE_UI event is triggered in a normal case when an accelerator key is used (even when the menu is disabled), but it is NOT triggered when the menu is hidden, which doesn't allow to fix its state. I tried using frame:UpdateWindowUI(wx.wxUPDATE_UI_RECURSE) and frame:UpdateWindowUI(wx.wxUPDATE_UI_FROMIDLE) but I don't see the UPDATE_UI triggered for that particular item. I also tried your code from wxLua (btw, why did you use it in your case?): function UpdateUIMenuItems() if frame and frame:GetMenuBar() then for n = 0, frame:GetMenuBar():GetMenuCount()-1 do frame:GetMenuBar():GetMenu(n):UpdateUI() end end end but it doesn't trigger UPDATE_UI either (in full screen mode). I tried putting this code in KEY_DOWN and ON_IDLE events with the same result. Is there a way to force UPDATE_UI on those menu items to make the accelerator keys work? Is there another workaround? This is on Win32 using wxwidgets 2.8.7. Thank you. Paul. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users