- assert.png (31.6 KiB) Viewed 3057 times
Mac Listctrl assertion
Mac Listctrl assertion
I got the following error on mac:
No error on Windows / Linux. What can cause this? I hope there is somebody who knows the proper way to solve it without having to understand wx inner code. (less work)Re: Mac Listctrl assertion
The error message is pretty obvious: You can't call SetItemCount() on a wxListCtrl that is not "virtual".
Apparently, you're not using a virtual wxListCtrl. In that case you can just remove the SetItemCount() call as it doesn't make sense anyway.
Apparently, you're not using a virtual wxListCtrl. In that case you can just remove the SetItemCount() call as it doesn't make sense anyway.
Use the source, Luke!
Re: Mac Listctrl assertion
oh yeah, thank you, the solution was as easy as u said.
I have a "stupid" question. I tested my wxErlang app under Mac again and managed to start the application without assertions. the new problem is that "my widgets are scattered all over the screen". I know that this is a hard question (without code and further, more precise information) but there may be somebody who knows what the error may be.
This screenshot shows my app after removing all the pages (for debugging purposes) from my main notebook widget except this page. As you can see it is a panel with another notebook (so my app consists of a main notebook and some other notebooks under some of the pages). My app (with all pages) under Win (or Linux): this is how i create my frame/widgets:
1, I create a frame
2, I create a panel (frame as parent)
3/1 Sizer (static, on panel)
3/2 notebook (panel as parent)
4, add Notebook to the sizer
5, wxPanel:setSizer(Panel, Sizer),
wxFrame:maximize(Frame),
wxFrame:sendSizeEvent(Frame),
6, setting up connections (connect)
7, adding pages to the notebook:
7/1 create a panel for the new notebook "page" (tab)
7/2 add sizer and widgets
7/3 wxPanel:setSizer(PanelOfCurrentNotebookPage, SizerOfCurrentNotebookPage),
wxSizer:layout(SizerOfCurrentNotebookPage),
8, show frame
(I tried to follow the guide lines of wxErlang demo)
Sorry for the stupid question, but I have no clue how to solve this on Mac...
I have a "stupid" question. I tested my wxErlang app under Mac again and managed to start the application without assertions. the new problem is that "my widgets are scattered all over the screen". I know that this is a hard question (without code and further, more precise information) but there may be somebody who knows what the error may be.
This screenshot shows my app after removing all the pages (for debugging purposes) from my main notebook widget except this page. As you can see it is a panel with another notebook (so my app consists of a main notebook and some other notebooks under some of the pages). My app (with all pages) under Win (or Linux): this is how i create my frame/widgets:
1, I create a frame
2, I create a panel (frame as parent)
3/1 Sizer (static, on panel)
3/2 notebook (panel as parent)
4, add Notebook to the sizer
5, wxPanel:setSizer(Panel, Sizer),
wxFrame:maximize(Frame),
wxFrame:sendSizeEvent(Frame),
6, setting up connections (connect)
7, adding pages to the notebook:
7/1 create a panel for the new notebook "page" (tab)
7/2 add sizer and widgets
7/3 wxPanel:setSizer(PanelOfCurrentNotebookPage, SizerOfCurrentNotebookPage),
wxSizer:layout(SizerOfCurrentNotebookPage),
8, show frame
(I tried to follow the guide lines of wxErlang demo)
Sorry for the stupid question, but I have no clue how to solve this on Mac...
Re: Mac Listctrl assertion
This is indeed hard to tell, usually this kind of symptom indicates a wrong parent-child relationship
First you should reduce the code as much as possible, e.g. only one button, one notebook with one page.
Also on the second screenshot, it looks as if you were using wxStaticBox sizers. If they are also in your demo-code, try replacing them with "normal" boxsizers for a test.
First you should reduce the code as much as possible, e.g. only one button, one notebook with one page.
Also on the second screenshot, it looks as if you were using wxStaticBox sizers. If they are also in your demo-code, try replacing them with "normal" boxsizers for a test.
Use the source, Luke!
Re: Mac Listctrl assertion
I found out that these lines
cause problems with widget positioning. If I remove proportion and expand ( Expand == [{flag, ?wxEXPAND}], nothing special just flags for sizers in a functional style) the notebook widget is positioned well.
Now I ll try to find out why these lies are problematic...
Code: Select all
wxSizer:add(Sz, ButtSz, [{proportion, 0}] ++ Expand),
wxSizer:add(Sz, Notebook1, [{proportion, 1}] ++ Expand),
Now I ll try to find out why these lies are problematic...
Re: Mac Listctrl assertion
I managed to solve the last problem but there is a new one here: buttons (and input fields) inside multiple sizers are unusable... I mean buttons are not clickable (but they are properly positioned).
Re: Mac Listctrl assertion
There is a solution for my sizer+control problem: (it is related to staticbox)
http://wxpython-users.1045709.n5.nabble ... 51829.html
Another problem I faced: I have a wxListCtrl which shows the files found in my database (nothing special). It is placed on a notebook page, I can reach this page but when I try to navigate to another one the mouse pointer changes and shows the program is loading and I cant do anything. On GTK and Win it works and doesnt consume (too much) memory and CPU (its loading time is less than 1 sec).
http://wxpython-users.1045709.n5.nabble ... 51829.html
Another problem I faced: I have a wxListCtrl which shows the files found in my database (nothing special). It is placed on a notebook page, I can reach this page but when I try to navigate to another one the mouse pointer changes and shows the program is loading and I cant do anything. On GTK and Win it works and doesnt consume (too much) memory and CPU (its loading time is less than 1 sec).