Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: gtafan on April 03, 2018, 03:53:38 pm

Title: wxSmith wxTreeListCtrl bugs
Post by: gtafan on April 03, 2018, 03:53:38 pm
When I was triing to create wxTreeListCtrl with wxSmit got a huge list of errors:

fatal error: wx/treelistctrl.h: No such file or directory

the reason
Code
#include <wx/treelistctrl.h>
must be changed to
Code
#include <wx/treelist.h>

error: 'wxTreeItemId' does not name a type

reason is this line:
Code
wxTreeItemId TreeListCtrl1ID[8];
error: 'class wxTreeListCtrl' has no member named 'AddColumn'

the reason
Code
TreeListCtrl1->AddColumn(_("First"), 64);
must be changed to
Code
TreeListCtrl1->AppendColumn(_("First"), 64);

error: 'class wxTreeListCtrl' has no member named 'AddRoot'

reason is this line:
Code
TreeListCtrl1ID[0] = TreeListCtrl1->AddRoot(_("(root)"));

error: 'class wxTreeListCtrl' has no member named 'ExpandAll'

reason is this line:
Code
TreeListCtrl1->ExpandAll(TreeListCtrl1ID[0]);

error: 'class wxTreeListCtrl' has no member named 'SetColumnEditable'

reason is this line:
Code
TreeListCtrl1->SetColumnEditable(0, false);

and there some more error mesages. I have fixed it all manually, but after making changes to the GUI everithing becomes f*cked up again.
Title: Re: wxSmith wxTreeListCtrl bugs
Post by: BlueHazzard on April 05, 2018, 09:57:32 am
it would be nice if you could use code tags if you post code (the # symbol in the forum editor) this would increase the readability of the post.

Thank you for the report.

@devs: how should this be handled?
1 and 3 would be the easiest...
I will create a Ticked as soon as we have discussed this, I don't like sf discussions
Title: Re: wxSmith wxTreeListCtrl bugs
Post by: gtafan on April 05, 2018, 04:12:18 pm
it would be nice if you could use code tags if you post code (the # symbol in the forum editor) this would increase the readability of the post.

Thank you for the report.

@devs: how should this be handled?
  • Add #if in the generated souce for wx28 and wx30?
  • Detect within wxSmith if we are using wx28 or wx30 and generate code accordingly? Can we detect this?
  • Doge wx28 completely within wxSmith?
1 and 3 would be the easiest...
I will create a Ticked as soon as we have discussed this, I don't like sf discussions
Sorry using code tags is abit dficult when code snipets are parts of the text, but I try in the future.