Author Topic: wxSmith does not create event table  (Read 7074 times)

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
wxSmith does not create event table
« on: March 07, 2007, 02:53:25 pm »
Hi,

wxSmith doesn't seem to create event table entries any more when you add a new handler. I am not using xrc if that makes any difference.

Les

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith does not create event table
« Reply #1 on: March 07, 2007, 02:56:47 pm »
Ok, I am an idiot :oops:. You are using connect instead...

Les

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not create event table
« Reply #2 on: March 08, 2007, 05:39:16 pm »
I've found them much more flexible and modern than standars event-table approach :)

BYO

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: wxSmith does not create event table
« Reply #3 on: March 08, 2007, 06:16:50 pm »
Will be grate to have wizard for custom components, that can be created and added to the palette.
gcc+winXP+suse.

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith does not create event table
« Reply #4 on: March 08, 2007, 09:46:09 pm »
I notice wxSmith still puts comment tags in the event table. Does it actually use them any more?

I will add my vote for custom controls. I use custom controls a lot. Even a basic library of custom control creation strings would be really useful.

Oh yes, a minor buglet. If you add a wxPanel to a wxNoteBook it can sometimes be difficult to place the first sizer on that panel. It keeps saying you need to place a panel before you can place the sizer.

Thanks,
Les


Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not create event table
« Reply #5 on: March 09, 2007, 12:36:49 am »
Will be grate to have wizard for custom components, that can be created and added to the palette.

I could do some easy custom control support which would be shown as static bitmap. Eventually I thought about adding wxDC class data into squirrel and which would allow dynamic content, but that may introduce some huge dependency problem (like providing wxBitmap in squirrel etc. as well).

So for now I'll start implementing the easier solution. Hope this will be enough for some time :)

I notice wxSmith still puts comment tags in the event table. Does it actually use them any more?

I left it for the time of testing Connect() functionality. Since it works well, this section will be removed soon. The only problem I've found is that EVT_BUTTON uses some hack when __SMARTPHONE__ is defined (EVT_BUTTON is mapped into EVT_MENU) but this can be handled inside source code too

Quote
I will add my vote for custom controls. I use custom controls a lot. Even a basic library of custom control creation strings would be really useful.

Oh yes, a minor buglet. If you add a wxPanel to a wxNoteBook it can sometimes be difficult to place the first sizer on that panel. It keeps saying you need to place a panel before you can place the sizer.

Thanks,
Les

Can you submit some bug report ? I've already found that bug some time agou but forgot about it  :oops:

Regards
   BYO

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith does not create event table
« Reply #6 on: March 09, 2007, 05:20:52 pm »
After some experimentation it isn't strictly a bug. The problem occurs if you don't have 'insert new widgets into current selection' selected. This is of course correct behaviour but it is a bit confusing if you don't realize you have one of the other options selected.

Here's another request for you: Is it possible for you to support validators? At the moment controls that use validators are fixed to wxDefaultValidator. This would be useful to me but I can work around it at the moment.

Thanks,
Les

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not create event table
« Reply #7 on: March 10, 2007, 11:37:04 am »
After some experimentation it isn't strictly a bug. The problem occurs if you don't have 'insert new widgets into current selection' selected. This is of course correct behaviour but it is a bit confusing if you don't realize you have one of the other options selected.

I should take this into consideration :) It would be better to silently switch into other "insertion mode" rather than displaying message.

Quote
Here's another request for you: Is it possible for you to support validators? At the moment controls that use validators are fixed to wxDefaultValidator. This would be useful to me but I can work around it at the moment.

Thanks,
Les

Right, but to be honest I'm not familliar with validators :( I must do some tests. The task may be easy when using common wxWidgets validators but things may get complicated when user-defined validator is used.

Regards
   BYO

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: wxSmith does not create event table
« Reply #8 on: March 10, 2007, 08:29:13 pm »
Quote
Right, but to be honest I'm not familliar with validators Sad I must do some tests. The task may be easy when using common wxWidgets validators but things may get complicated when user-defined validator is used.

I don't use them a huge amount either. I just have one custom validator that I use quite a bit. All you really need to do is have a box called 'validator' that defaults to wxDefaultValidator but the user can enter their own. It is added into the control's constructor just like you do now.

Thanks,
Les

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith does not create event table
« Reply #9 on: March 13, 2007, 12:54:28 am »
I don't use them a huge amount either. I just have one custom validator that I use quite a bit. All you really need to do is have a box called 'validator' that defaults to wxDefaultValidator but the user can enter their own. It is added into the control's constructor just like you do now.

Thanks,
Les

Simple property should be quite easy to add :) Just few new lines of code (I guess no more than about 20  8)). But without validation of property's value it may be some kind of trap for newbies so I'll probably put it at the end of property list.

BYO