wxPanel Base and Inhereted Class

Post here wxCrafter related issues / features / bugs
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

wxPanel Base and Inhereted Class

Post by nezos »

I am trying to add in Codelite using wxCrafter a wxPanel (wxCrafter->Add wxWidgets UI Form). I set the base and inhereted class, add a sizer on the panel and then click on generate code.

I get the message that two files were not generated due to a name-clash. Strange thing is that i don't have another class/function or anything with the same name. The outcome is that only 2 files are generated named after the inhereted class but inside it is defined only the base class and the comments not to modify the file.

Am i doing something wrong?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPanel Base and Inhereted Class

Post by eranif »

String comparison does not lie ;)
You have 2 files with these names already (case insensitive)
If you don't then check that the Inherited class file name does not match the base class name

I might assist if you upload your wxcp file here

Eran
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPanel Base and Inhereted Class

Post by nezos »

Ok here it is:
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPanel Base and Inhereted Class

Post by eranif »

The problem is that your wxcp file name is "FileArgumentsListPanel.wxcp"
This means that all the base classes will be generated in 2 files: FileArgumentsListPanel.cpp and FileArgumentsListPanel.h
However, you set the same file name for the inherited class name ("FileArgumentsListPanel")
You should change one of them..
Either change the base classes file name by clicking on the top most level in the wxCrafter tree view and change the output file name.
Or change the "Inherited class name" (see attached screenshots for references)
snapshot2.png
snapshot1.png
EDIT:
to avoid such problems, I usually suffix the wxcp file with "Base"

Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPanel Base and Inhereted Class

Post by nezos »

Ok that did the trick, didn't know that the wxcp name was related to the base class name.

Thanks!
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxPanel Base and Inhereted Class

Post by eranif »

nezos wrote:Ok that did the trick, didn't know that the wxcp name was related to the base class name.
The base classes need to be generated somewhere... so the default name is to use the wxcp file. Maybe a good idea will be to suffix "base" automatically if its missing to make it more unique

Eran
Make sure you have read the HOW TO POST thread
Post Reply