Omar Mussa Posted April 5, 2008 Report Share Posted April 5, 2008 I preface this topic by the following statement: I think that the fact that LVOOP Classes are not automatically namespaced in built applications is a serious problem that should have been resolved by 8.5. When I open a class in the development environment, it is in the name space "Class:VI Name" so it seems unreasonable to me that this is not handled automatically in the LV Runtime Engine (or LV Builder, choose your poison -- I personally think it should be a LV Runtime Engine fix because otherwise you couldn't dynamically load classes into built applications -- & I'm not even sure if you can do that now). If this problem were solved, there would be no need for the workarounds I mention below. I recently upgraded a project from 8.2.1 to 8.5 (why, because my customer wants to be on the bleeding edge -- really no other reason than that). In doing this, for whatever reason, I was no longer able to build an installer from my application. After looking at the warnings, I decided it was most likely due to namespace issues in my built EXE. I grew weary and tired of the warnings from App Builder about LabVIEW finding namespace issues and decided it was time to use the 'Destinations' and 'Source File Settings' pages and take control of my namespace once and for all. Then an issue hit me. If you select a class on the 'Source File Settings' page, you cannot set the contents of the class to have a 'filename prefix' (i.e. namespace). However, if you select a Virtual Folder, you can set a 'filename prefix' (it propagates to all items in the Virtual Folder). So the following workaround found its way into my life. If you create a Virtual Folder (I called mine 'Class Members') and then shove all of your methods, controls, Virtual Folders, etc. into the folder, you can then use this virtual folder for setting your class contents into a namespaced destination. This resolved all of my build conflicts (others arose but were not namespace related so far as I can tell). I plan on using this workaround on any new classes I make until LabVIEW properly sets the namespace automatically in the build process. Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.