views:

117

answers:

1

The text for my buttons is being saved by default as a resource. But then when I click "run," the resource file it loads is the one in the "build" part of the project, not the "source" part. And they aren't the same!

For instance, one button I call "create chart". If I do "Clean and Build" it loads correctly, but after that, any changes I make in the IDE aren't saved: if I change it to "create this chart", design view thinks it's called "create this chart" but I run the project and it still says "create chart". What the heck? How are my source resource files not synching with the build resource files?

+1  A: 

In some IDE's (netbeans is one of them) the whole project does not compile unless source files are changed.

When there is a resource file in build folder named XXXX, netbeans only checks whether the file exists in build. If it does not, netbeans copies it to build, if not does nothing.

During clean and build process, netbeans deletes the resource file (in clean process) and then copies new file from source folder (in build process)

JCasso
So once I define a resource like the text for a label, if I want to change it I need to clean and build?
Will Penman
Mm, seems like it's more difficult than that. Just added a button, ran project, but its text won't appear... seems like netbeans has stopped copying all my source resource file entries to build (including the one for my new button). It didn't used to do that, and what's weird is that in design view netbeans is still convinced the new button has a text.
Will Penman
You added a button and the caption of the button is being held in resource file?
JCasso
Yeah, that's the default. In Properties of the button, you can do special things with the text, but the default is for the "define as a resource" and "localized" check-boxes to be checked. So I don't know what's wrong, because I haven't changed anything and it used to work fine. Thanks for your help, btw.
Will Penman