Author Topic: wxSmith 'class name' suggestion  (Read 9698 times)

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
wxSmith 'class name' suggestion
« on: February 15, 2007, 05:48:51 pm »
Would it be possible to add a 'class name' option to the properties editor? This would default to the control's normal class name. It would work in exactly the same way as the custom control's class name. A lot of the time I am using classes that are derived from standard controls but with slightly different functionality. At the moment each one needs to be defined as a custom control.

Say for example I have a control called wxMyListBox that descends from wxListBox. I could place a list box and change the class name to wxMyListBox and it would show up correctly in wxSmith. The code however would then be generated using my class. As long as I don't change my control's constructor it should work perfectly

Thanks for a great CB plugin.

Les

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: wxSmith 'class name' suggestion
« Reply #1 on: February 15, 2007, 06:55:25 pm »
That will be good idea. The same idea was used in wxDevCpp and I use it a lot.
gcc+winXP+suse.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith 'class name' suggestion
« Reply #2 on: February 16, 2007, 12:26:40 pm »
Your wish is my commad ;) Shouldn't be hard to implement, I'l do it today / tomorrow, just need to finish menus first :)

BYO

lymichri

  • Guest
Re: wxSmith 'class name' suggestion
« Reply #3 on: February 16, 2007, 12:37:49 pm »
That are great news. :D I think, when this is implemented I can switch from wxGlade to wxSmith

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith 'class name' suggestion
« Reply #4 on: February 16, 2007, 07:53:12 pm »
That is great! Thanks.

Les

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: wxSmith 'class name' suggestion
« Reply #5 on: February 16, 2007, 09:07:59 pm »
The first version of menu was baggy. Would be grate to have a tutorial how we can add custom component in to the wxSmith, if you have that option.
gcc+winXP+suse.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith 'class name' suggestion
« Reply #6 on: February 16, 2007, 10:25:30 pm »
The first version of menu was baggy

What exactly do you mean ? Which rev ?

manianis

  • Guest
Re: wxSmith 'class name' suggestion
« Reply #7 on: February 18, 2007, 05:26:28 pm »
I've not tested yet the wxSmith menu.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith 'class name' suggestion
« Reply #8 on: February 19, 2007, 01:23:23 am »
Found few bugs in menu support (f.ex. can not create sub-meuns with sub-menus). Bug fixes tomorrow :)

manianis

  • Guest
Re: wxSmith 'class name' suggestion
« Reply #9 on: February 20, 2007, 08:08:16 am »
Good works...  :)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith 'class name' suggestion
« Reply #10 on: February 20, 2007, 03:28:10 pm »
Good works...  :)

I assume this is for menus :) nice to hear that :). But how about 'class name' ? (It's called 'Custom class' in resource browser). Does it work as it should ? (I've never used this technique so I've implemented as I would like it to work ;) ).

BYO

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith 'class name' suggestion
« Reply #11 on: February 23, 2007, 03:51:41 pm »
Sorry I didn't get back to you earlier but I have been away for a couple of days. The custom class works well. It will make my life a lot easier. Thanks!

Just a suggestion - Instead of having a box for 'Custom class', why not have a box called 'Class name'. it would normally hold the class name of that control (e.g wxListBox) but you could change it to something else if you want, e.g. wxCheckListBox. At the moment the custom control now has 'Class name' and 'Custom class'.

Les