keyboard event not called on subclass of wxScrolledWindow (on mac)

Riccardo Cohen rcohen at articque.com
Wed Sep 26 13:20:03 PDT 2007


As I really need this event, what is the best : wait for an update in 
2.9 (but how long ?) or change my class to inherit from wxWindow, and 
re-write scrollbars in it ?(seems some work)
Thanks for any info


Riccardo Cohen wrote:
> The backtrace for the scroll bar is :
> 
> #0  wxControlContainerBase::HasAnyFocusableChildren
> #1  0x001fd2d5 in wxControlContainerBase::UpdateCanFocus
> #2  0x00065322 in wxPanel::AddChild
> #3  0x0003fa64 in wxWindow::MacPostControlCreate
> #4  0x000b6b79 in wxScrollBar::Create
> #5  0x001f7158 in wxScrollBar::wxScrollBar
> #6  0x00041eee in wxWindow::MacCreateScrollBars
> #7  0x0004226d in wxWindow::Create
> #8  0x0006547f in wxPanel::Create
> #9  0x0004dce3 in wxScrolledWindow::Create
> #10 0x001e5990 in wxScrolledWindow::wxScrolledWindow
> #11 0x00002686 in artwx::artwx
> 
> and when I stop in IsClientAreaChild(child), I find :
> 
> (gdb) p this->m_hScrollBar
> $6 = (class wxScrollBar *) 0x0
> 
> which seems to make MacIsWindowScrollbar answers "No".
> 
> when I stop at MacPostControlCreate, and try to track the AddChild call:
> 
> #0  wxWindowBase::AddChild (this=0x6017800, child=0x5931210) at 
> ../src/common/wincmn.cpp:915
> #1  0x00065312 in wxPanel::AddChild (this=0x6017800, child=0x5931210) at 
> ../src/generic/panelg.cpp:100
> 
> 
> panelg.cpp:100     WX_DELEGATE_TO_CONTROL_CONTAINER(wxPanel, wxWindow)
> 
> So I don't know when m_hScrollBar is updated.
> 
> 
> 
> Vadim Zeitlin wrote:
>> On Mon, 24 Sep 2007 16:20:48 +0200 Riccardo Cohen 
>> <rcohen at articque.com> wrote:
>>
>> RC> first time it returns true :
>> RC> #0  wxControlContainerBase::HasAnyFocusableChildren
>> RC> #1  0x001fd2d5 in wxControlContainerBase::UpdateCanFocus
>> RC> #2  0x00058392 in wxTopLevelWindowBase::AddChild
>> RC> #3  0x0003fa64 in wxWindow::MacPostControlCreate
>> RC> #4  0x000421bc in wxWindow::Create
>> RC> #5  0x0006547f in wxPanel::Create
>> RC> #6  0x0004dce3 in wxScrolledWindow::Create
>> RC> #7  0x001e5990 in wxScrolledWindow::wxScrolledWindow
>> RC> #8  0x00002686 in artwx::artwx
>> RC> RC> it enters 2 more times in this function (for my class) 
>> returning always RC> true, (it is for the scrollbars)
>>
>>  Do you see how does it happen? IsClientAreaChild() implementation in
>> wx/mac/carbon/window.h explicitly checks for !MacIsWindowScrollbar() so I
>> don't understand why it doesn't skip the scrollbars as it's intended to.
>> Anyhow, this is clearly the bug which must be fixed...
>>
>>  Regards,
>> VZ
>>
> 

-- 
Très cordialement,

Riccardo Cohen
ligne directe : 02-47-49-63-24
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49





More information about the wx-users mailing list