CVS: [VZ] wxWindows/src/generic choicbkg.cpp, 1.23, 1.24 listbkg.cpp, 1.43, 1.44 toolbkg.cpp,1.19,1.20 treebkg.cpp,1.18,1.19

Paul Cornett pc-wx at bullseye.com
Fri Jan 19 21:34:50 PST 2007


Hi,
I'm getting an assertion in src/common/wincmn.cpp, line 248, "id =3D=3D =

wxID_ANY || (id >=3D 0 && id < 32767)",
with the notebook sample, choosing any of the book types except =

notebook. Partial backtrace attached.

And, somewhat unrelated, why are those names like wxID_CHOICEBOOKCHOICE =

needed, and why are they globals?

anonymous at sunsite.dk wrote:
> Update of /pack/cvsroots/wxwidgets/wxWindows/src/generic
> In directory sunsite.dk:/tmp/cvs-serv9743/src/generic
> =

> Modified Files:
> 	choicbkg.cpp listbkg.cpp toolbkg.cpp treebkg.cpp =

> Log Message:
> use wxWindow::NewControlId() instead of wxNewId() to avoid clashes with t=
he user-defined ids
> =

> Index: choicbkg.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /pack/cvsroots/wxwidgets/wxWindows/src/generic/choicbkg.cpp,v
> retrieving revision 1.23
> retrieving revision 1.24
> diff -u -b -r1.23 -r1.24
> --- choicbkg.cpp	2006/11/04 12:20:08	1.23
> +++ choicbkg.cpp	2007/01/18 14:15:50	1.24
> @@ -54,7 +54,7 @@
>  const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING =3D wxNewEventT=
ype();
>  const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED =3D wxNewEventTy=
pe();
>  #endif
> -const int wxID_CHOICEBOOKCHOICE =3D wxNewId();
> +const int wxID_CHOICEBOOKCHOICE =3D wxWindow::NewControlId();
>  =

>  BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
>      EVT_CHOICE(wxID_CHOICEBOOKCHOICE, wxChoicebook::OnChoiceSelected)
> =

> Index: listbkg.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /pack/cvsroots/wxwidgets/wxWindows/src/generic/listbkg.cpp,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -u -b -r1.43 -r1.44
> --- listbkg.cpp	2006/11/04 12:20:08	1.43
> +++ listbkg.cpp	2007/01/18 14:15:50	1.44
> @@ -54,7 +54,7 @@
>  const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING =3D wxNewEventTyp=
e();
>  const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED =3D wxNewEventType=
();
>  #endif
> -const int wxID_LISTBOOKLISTVIEW =3D wxNewId();
> +const int wxID_LISTBOOKLISTVIEW =3D wxWindow::NewControlId();
>  =

>  BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase)
>      EVT_SIZE(wxListbook::OnSize)
> =

> Index: toolbkg.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /pack/cvsroots/wxwidgets/wxWindows/src/generic/toolbkg.cpp,v
> retrieving revision 1.19
> retrieving revision 1.20
> diff -u -b -r1.19 -r1.20
> --- toolbkg.cpp	2006/10/09 21:29:10	1.19
> +++ toolbkg.cpp	2007/01/18 14:15:51	1.20
> @@ -50,7 +50,7 @@
>  const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING =3D wxNewEventTyp=
e();
>  const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED =3D wxNewEventType=
();
>  #endif
> -const int wxID_TOOLBOOKTOOLBAR =3D wxNewId();
> +const int wxID_TOOLBOOKTOOLBAR =3D wxWindow::NewControlId();
>  =

>  BEGIN_EVENT_TABLE(wxToolbook, wxBookCtrlBase)
>      EVT_SIZE(wxToolbook::OnSize)
> =

> Index: treebkg.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /pack/cvsroots/wxwidgets/wxWindows/src/generic/treebkg.cpp,v
> retrieving revision 1.18
> retrieving revision 1.19
> diff -u -b -r1.18 -r1.19
> --- treebkg.cpp	2006/11/04 12:20:09	1.18
> +++ treebkg.cpp	2007/01/18 14:15:51	1.19
> @@ -54,7 +54,7 @@
>  const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED =3D wxNewEventTy=
pe();
>  const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED =3D wxNewEventTyp=
e();
>  #endif
> -const int wxID_TREEBOOKTREEVIEW =3D wxNewId();
> +const int wxID_TREEBOOKTREEVIEW =3D wxWindow::NewControlId();
>  =

>  BEGIN_EVENT_TABLE(wxTreebook, wxBookCtrlBase)
>      EVT_TREE_SEL_CHANGED   (wxID_TREEBOOKTREEVIEW, wxTreebook::OnTreeSel=
ectionChange)
> =

> =

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-cvs-diffs-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-cvs-diffs-help at lists.wxwidgets.org
> =

> =

> =

-------------- next part --------------
#6  0x0000000000421862 in wxOnAssert (szFile=3D0x63a885 "../src/common/winc=
mn.cpp", nLine=3D249, szFunc=3D0x63b292 "CreateBase", =

    szCond=3D0x63ab10 "id =3D=3D wxID_ANY || (id >=3D 0 && id < 32767)", sz=
Msg=3D0x63aaff "invalid id value")
    at ../src/common/appbase.cpp:712
#7  0x0000000000516038 in wxWindowBase::CreateBase (this=3D0xb9ea00, parent=
=3D0xb9c820, id=3D-202, style=3D2097956, validator=3D at 0x909c80, =

    name=3D at 0x7fffc898db70) at ../src/common/wincmn.cpp:248
#8  0x00000000004c0c4c in wxToolBar::Create (this=3D0xb9ea00, parent=3D0xb9=
c820, id=3D-202, pos=3D at 0x908d58, size=3D at 0x908d50, =

    style=3D2097956, name=3D at 0x7fffc898db70) at ../src/gtk/tbargtk.cpp:303
#9  0x00000000004ddb25 in wxToolBar (this=3D0xb9ea00, parent=3D0xb9c820, id=
=3D-202, pos=3D at 0x908d58, size=3D at 0x908d50, style=3D2097956, =

    name=3D at 0x7fffc898db70) at ../include/wx/gtk/tbargtk.h:33
#10 0x0000000000538eb7 in wxToolbook::Create (this=3D0xb9c820, parent=3D0xa=
cb050, id=3D-1, pos=3D at 0x908d58, size=3D at 0x908d50, style=3D2097168, =

    name=3D at 0x7fffc898dcd0) at ../src/generic/toolbkg.cpp:121


More information about the wx-dev mailing list