Page 1 of 1

Specify Arguments to Ctor

Posted: Wed Jun 05, 2013 10:26 pm
by evstevemd
I have something like this
wxC allows me to specify a sublclass but I cannot change Ctor.
I want to be able to tell my base class of the Ctors of both the base class as well as how subclass.
Also it would be nice to tell wxC that I want to use my own ctor both in .h and .cpp so generate other stuffs but use this code for ctor in base/subclass

Re: Specify Arguments to Ctor

Posted: Wed Jun 05, 2013 10:42 pm
by evstevemd
Just a rant, why is there no undo/redo? :o

Re: Specify Arguments to Ctor

Posted: Thu Jun 06, 2013 8:37 am
by eranif
evstevemd wrote:Just a rant, why is there no undo/redo?
There is... and it is working fine (for me at least)
Please specify a use case that it fails
evstevemd wrote:wxC allows me to specify a sublclass but I cannot change Ctor.
I want to be able to tell my base class of the Ctors of both the base class as well as how subclass.
Atm, this is how subclass works. Your class needs to have the same signature as the actual class
evstevemd wrote:Also it would be nice to tell wxC that I want to use my own ctor both in .h and .cpp so generate other stuffs but use this code for ctor in base/subclass
I did not understand this part

Eran

Re: Specify Arguments to Ctor

Posted: Thu Jun 06, 2013 10:26 am
by evstevemd
eranif wrote:
evstevemd wrote:Just a rant, why is there no undo/redo?
There is... and it is working fine (for me at least)
Please specify a use case that it fails
It does not work for me. Test case: Add AUI Notebook. Then add new page.
Now try to undo add page (or even remove page) and it does not work.
eranif wrote:
evstevemd wrote:wxC allows me to specify a sublclass but I cannot change Ctor.
I want to be able to tell my base class of the Ctors of both the base class as well as how subclass.
eranif wrote: Atm, this is how subclass works. Your class needs to have the same signature as the actual class
But it might be taking less arguments (eg wxStc taking first three args and the rest should remain as wxDefaults)
eranif wrote:
evstevemd wrote:Also it would be nice to tell wxC that I want to use my own ctor both in .h and .cpp so generate other stuffs but use this code for ctor in base/subclass
I did not understand this part

Eran
I mean to be able to tell wxC how I want my Ctor to be and generate it that way.
Suppose I have a wxPanel. wxC will try to generate a ctor with all wxPanel arguments that is wxPanel(wxWindow parent, id.....)
Now suppose I want my wxPanel ctor to be different just wxPanel(parent, id, SomeClassPointer*) I suggest to be able to tell wxC that in generating Ctor just copy my custom instead of default. Not sure if I have made clear myself!

Thanks for help also!