Author Topic: wxSmith not saving parts of project in xrc file  (Read 5489 times)

neonomicus

  • Guest
wxSmith not saving parts of project in xrc file
« on: June 28, 2006, 08:39:10 am »
HEy :) me again
I hope this is the fitting forum ^^

I use wxSmith and order it to save my nice Panel in a resource file. It does so, but it only writes this into the file:

<resource>
    <object class="wxPanel" name="QSClientPanel">
        <style>wxTAB_TRAVERSAL</style>
    </object>
</resource>

I want the panel to be loaded in a wxNotebook which works. But since no children-windows are saved at all, my panel looks pretty empty ^^

I'm sure I just misconfigured something but since I did not manage to get out what, and I obviously am the first one to experience that problem (google, forum search) I ask you! :D

Thanks in advance,
Regards

Neonomicus

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith not saving parts of project in xrc file
« Reply #1 on: June 28, 2006, 12:19:00 pm »
I quess this has been reported here: https://developer.berlios.de/bugs/?func=detailbug&group_id=5358&bug_id=7976.

One question: Could you write step-by-step instructions leading to this behaviour ?

One more question: have you changed any property of any widget? I haven't had enough time to check this yet but I think that source code is recreated only when properties change, it's not when adding new item.

neonomicus

  • Guest
Re: wxSmith not saving parts of project in xrc file
« Reply #2 on: June 28, 2006, 12:56:39 pm »
Step by step into the trap ;) :

wxSmith->add panel
  check resource file and choose default name
add some windows and stuff.

close code::blocks and restart it
open your project

now changing anything in the wxsmith project will have no effect on the .xrc file. Neither changed attributes nor added windows are updated.

The issue on berlios is exactly what I experience :) and the workarround the poster provides helps me too, so it's not that bad ;)

But great plugin I have to say!

Kepp up the good work

Neonomicus

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith not saving parts of project in xrc file
« Reply #3 on: June 28, 2006, 06:21:14 pm »
Ok, I've found that bug. It should work fine now, but that bug saused .cbp files to have invalid properties.

To fix .cbp file:
  • Open .cbp in any text editor (project must not be open in C::B)
  • find <wxsmith> node (it's currently badly aligned so it won't be hard to find;) )
  • In each <frame...> or <panel...> change value of xrc_file="..." attribute to name of xrc file (name should be relative to project's path, usually xrc file name without any directories before)

That should work :)

neonomicus

  • Guest
Re: wxSmith not saving parts of project in xrc file
« Reply #4 on: June 28, 2006, 07:25:29 pm »
Si si :) Works perfect now

thx

vesselin_peev

  • Guest
Re: wxSmith not saving parts of project in xrc file
« Reply #5 on: June 28, 2006, 08:06:01 pm »
Byo, I came here via the follow-up link you posted in my bug report. Thank you very much for fixing the issue.

All the best,
Vesselin.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith not saving parts of project in xrc file
« Reply #6 on: June 29, 2006, 01:05:14 am »
Si si :) Works perfect now

Glad to hear that  8)