Author Topic: C::B with wxsmith, newbie question  (Read 2683 times)

Offline Kamesh

  • Single posting newcomer
  • *
  • Posts: 6
C::B with wxsmith, newbie question
« on: October 15, 2008, 08:39:20 pm »
Hi all,
I am sorry to pose this rather simple question. I created a wxsmith frame and added simple code manually to one button. Later when I added one more button to the frame the code I wrote for the first button disappeared (I think the code got over written)!! How do I retain the code I typed earlier when I make changes to the frame when adding/modifying any frame. Thank you for your answers.

« Last Edit: October 15, 2008, 08:41:42 pm by Kamesh »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: C::B with wxsmith, newbie question
« Reply #1 on: October 16, 2008, 12:40:10 am »
Some parts (but only parts) of source code files is automatically regenerated from scratch when anything changes in the resource. You can easily find such blocks since they start with //(* comment and end with //*) comments. Everything in such block is rewritten.
Now if you want to do something with items created, you can either do it right after the //*) comment (preffered) or by using "Extra code" property - code entered in this property will be added just after the widget is created.

Regards
   BYO

Offline Kamesh

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B with wxsmith, newbie question
« Reply #2 on: October 16, 2008, 04:24:19 am »
Thank you BYO. Will check.