Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

wxSmith wxTreeListCtrl bugs

(1/1)

gtafan:
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>
--- End code ---
must be changed to
--- Code: ---#include <wx/treelist.h>
--- End code ---

error: 'wxTreeItemId' does not name a type

reason is this line:
--- Code: ---wxTreeItemId TreeListCtrl1ID[8];

--- End code ---
error: 'class wxTreeListCtrl' has no member named 'AddColumn'

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

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

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

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

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

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

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

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.

BlueHazzard:
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

gtafan:

--- Quote from: 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?

* 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

--- End quote ---
Sorry using code tags is abit dficult when code snipets are parts of the text, but I try in the future.

Navigation

[0] Message Index

Go to full version