Hi John,

Ok, I narrowed it down to a problem with wxStaticBoxSizer as the
following short script shows (this is with wxlua 2.8.12.1 and
wxwidgets 2.8.12 running on OSX10.7.4):

require "wx"
local findDialog = wx.wxFrame( wx.NULL, wx.wxID_ANY, "Checkbox in sizer demo",
  wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxDEFAULT_FRAME_STYLE)
local wholeWordCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY,
"Match &whole word")
local matchCaseCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY, "Match &case")
local wrapAroundCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY,
"Wrap ar&ound")

local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)

local optionsSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog,
"Options" ) --<-- change to wxBoxSizer to fix
optionsSizer:Add(optionSizer, 0, 0, 5)

local optionScopeSizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
optionScopeSizer:Add(optionsSizer, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 5)
optionScopeSizer:SetSizeHints(findDialog)
findDialog:SetSizer(optionScopeSizer)
findDialog:Show(true)
wx.wxGetApp():MainLoop()

Replacing wxStaticBoxSizer with wxBoxSizer fixes the issue (but
obviously changes the layout of the form). The problem is only on OSX
(Windows and Linux show no issue) and it seems like it's a wxwidgets
issue, but I can't find anything about it online, so I'm not 100%
sure.

I'm looking for a fix/workaround. Is there an easy way to check what
object gets those clicks and to propagate the clicks to my checkboxes?

Paul.

On Sat, Oct 13, 2012 at 11:29 AM, Paul K <paulclin...@yahoo.com> wrote:
> Hi John,
>
> I think it's indeed a sizer-related issue; for example, if I comment
> out the following in the editor.wx.lua example, then one of the
> checkboxes works, (it is in the top left corner):
>
>     local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
>     --optionSizer:Add(wholeWordCheckBox,  0, wx.wxALL + wx.wxGROW +
> wx.wxCENTER, 3)
>     optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW +
> wx.wxCENTER, 3)
>     optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW +
> wx.wxCENTER, 3)
>     optionSizer:Add(regexCheckBox,      0, wx.wxALL + wx.wxGROW +
> wx.wxCENTER, 3)
>
> Any idea on how to fix this?
>
> Paul.
>
> On Sat, Oct 13, 2012 at 11:07 AM, Paul K <paulclin...@yahoo.com> wrote:
>> Hi John,
>>
>> One of the users noticed that checkboxes in Find/Replace dialogs in
>> ZeroBraneStudio don't react to clicks on Mac OSX; I tested
>> Find/Replace dialog in your editor.wx.lua sample and it shows exactly
>> the same issue (using wxlua 2.8.12.1). Other checkboxes (for examples
>> in controls.wx.lua) work as expected, so I think it's not wxCheckBox
>> problem. I suspect it's some sort of interaction between sizers and
>> controls (and only on Mac OSX as both Windows and Linux versions work
>> correctly). Radioboxes on the same panel also work correctly. Any help
>> or ideas to test would be appreciated.
>>
>> Paul.

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to