Page 1 of 1
wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 11:48 am
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?
Re: wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 12:26 pm
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
Re: wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 12:39 pm
by nezos
Ok here it is:
Re: wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 12:50 pm
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
Re: wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 12:58 pm
by nezos
Ok that did the trick, didn't know that the wxcp name was related to the base class name.
Thanks!
Re: wxPanel Base and Inhereted Class
Posted: Mon Mar 16, 2015 1:01 pm
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