User forums => Using Code::Blocks => Topic started by: koen on August 17, 2007, 10:09:50 am

Title: wxSmith: Delete resource
Post by: koen on August 17, 2007, 10:09:50 am
I can add a wxPanel / wxDialog / wxFrame, but how do I delete one? If I click on the panel/dialog/frame in the resources list in the management window, I cannot find a way to delete it. Pressing the red X doesn't work, Edit - Cut doesn't work, etc. I like to get rid of some old stuff that's in my project, without recreating the whole thing!
Title: Re: wxSmith: Delete resource
Post by: byo on August 17, 2007, 12:06:30 pm
Currently it's not implemented automatically - I've mainly focused on ability to add and modify stuff rather than delete it ;)

But if you want to remove resources quickly, simply delete corresponding .wxs files in wxsmith directory, remove cpp/h files from project (and probably also delete them), after that if you'll save project (after some modification or after forcing it by making some "fake" modification), it should remove any bindings to removed resources from project.

You could add feature request at berlios so it will be less probable that I forget about it next time I'll add new features ;)

Title: Re: wxSmith: Delete resource
Post by: koen on August 17, 2007, 03:52:36 pm
I tried it, but it's still there :-( All the files with the name of the resource were removed from my disk, yet after saving the project, I still get a new, empty resource (wxPanel in my case).

Note that the resource actually has a different name than the filename of the .wxs file. The resource is called pnlReview, while the filename is pnlReview1.wxs. I think that was caused by a crash shortly after creating the resource the first time. When I recreated it after the crash, the name was changed to pnlReview1.wxs.

Anyway, I boldly edited the project file with an XML editor, removed the reference to the wxPanel that offended me, and it all seems fine now. I also filed a feature request.