Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: wudimei_com on May 02, 2014, 06:38:18 am

Title: bugs and suggestion about new class
Post by: wudimei_com on May 02, 2014, 06:38:18 am
1.bug:

the IDE create tow files after click "Create":
include/WBox.h
src/WBox.cpp

#include "WBox.h"
should be :
#include "../include/WBox.h"

2.could you create a checkbox to add DLL_EXPORT to the class defination?
the dialog show the checkbox control:
[X] add "DLL_EXPORT"
after click "Create" button,the IDE generate the code:
 
class DLL_EXPORT WBox{ ... }

3.could you add namespace text box?
namespace:[UI::Forms] ,a textfield
and the IDE create the code:

/* filename: include/WBox.h */

namespace UI{
  namespace Forms{
     class DLL_EXPORT WBox{
      ...
     }
  }
}

/* filename:  src/WBox.cpp */

namespace UI{
  namespace Forms{
     WBox::WBox(){
            ...
     }

  }
}

4. could you create the namespace as directory-tree?
eg:
/src/UI/Forms/WBox.cpp
/include/UI/Forms/WBox.h

thankyou
best regards!

yang
Title: Re: bugs and suggestion about new class
Post by: Jenna on May 02, 2014, 07:30:45 am
Please use code-tags if you post source-code (#-button in the forums editor) !!
It makes your post much more readable.

First question :
Which version of C::B do you use ?

Answers to your questions, suggestions:

1. is not a bug, it's by design, you can chose where the files are created and you can add the include-path to the build options automatically,

2. not implemeted as far as I know

3. already there, just use namespace1::namespace2::class in the name-field

4. already implemented
Title: Re: bugs and suggestion about new class
Post by: wudimei_com on May 04, 2014, 10:27:01 am
i use C::B 13.12 in windows

thank you
Title: Re: bugs and suggestion about new class
Post by: wudimei_com on May 04, 2014, 10:32:59 am
bugs:

i have created tow construct:
Code
WString::WString(TCHAR *str){
}

WString::WString(LPCTSTR *str){

}
when i type:
Code
new WString()
the editor' auto-complete show ONLY one construct:
WString::WString(LPCTSTR *str)
Title: Re: bugs and suggestion about new class
Post by: ollydbg on May 04, 2014, 11:38:16 am
bugs:

i have created tow construct:
Code
WString::WString(TCHAR *str){
}

WString::WString(LPCTSTR *str){

}
when i type:
Code
new WString()
the editor' auto-complete show ONLY one construct:
WString::WString(LPCTSTR *str)

I can see the two functions, see the two images below:
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2014-05-04173355_zpsc4de9acf.png)
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2014-05-04173336_zpse5b0206b.png)
I'm using the latest SVN build by myself.