I found a repeatable bug in LabVIEW 8. Here are some simple steps to demonstrate it:
1. Open a new blank VI.
2. Place a control in it. (A boolean works well for demonstration, but I also found the problem occurs for others)
3. Right click: advanced->customize...
4. Copy a picture in a graphics application (just create something simple in Paint and copy it)
5. Go back to the control you are customizing in LabVIEW. Right click on the control and do "Import Picture from Clipboard->false"
6. Close the control, replacing the control with the customized version. (Doesn't matter if you save the custom control or not nor if you save it as a control, typedef, or strict typedef.)
7. Copy the boolean and paste a second copy of it into your VI.
8. Open a new project, adding your VI to it.
9. Create a new .exe application in the project, go to "Source Files" in its properties, add your VI as the startup VI.
10. Build your application.
11. Run it.
You'll see that only one of your booleans has the graphics that you imported and the other will have some place-holder graphic (a stretched 'd') instead of the desired graphic.
In playing around with this, I found a simple workaround that would fix this example would be to import the graphics for each copy of the control in the main VI (right click on each copy of the control, customize, import graphics again). However, this isn't a good workaround in my application where I have many instances of my customized button and the button is saved as a typedef. The whole idea with typedefs is that I can edit it and every instance of it in my applications will reflect the changes. I don't want to disconnect from the typedef, which is what I would have to do to apply this workaround.
Reusing a control with imported graphics worked fine for me in LabVIEW 7.1. I didn't have problems with this until I upgraded to LabVIEW 8.
This is the same bug that I posted about yesterday
here.
One thing that I already tried is to uncheck the build application switch for "disconnect type definitions and remove unused polymophic BI instances". Doesn't seem to matter how this is set.
Can anyone think of a workaround for me that doesn't involve me disconnecting from my type def?
Thanks