Jump to content

Rename of Class Members

Recommended Posts

Okay, bringing This Thread out again... sorry AQ :)

In the app builder, anyone that has built an OOP based EXE or DLL has experienced the "conflicting name" warning, and seen the suggestion to rename the files in the build process as a workaround. Well, the app builder actually lets you do this with class members...which totally breaks inheritance.

I'll post an example later, but basically:

1) Create three classes; a parent and two children, with a common method "A.vi" with dynamic class terminals and a single numeric output

2) Create a test.vi that uses a numeric input to a case structure to select which object (parent, child1, or child2) to pass into the A.VI method, and an output to tell which method was called

3) Build this test.vi into a DLL with the test.vi as it's exported function (numeric input, numeric output)

4) You'll of course notice that this creates subfolders for the conflicting name A.vi

5) Test the DLL, you should get the desired output for the corresponding input you set up in the test.VI

6) Now, re-open the DLL build spec and tell the app builder to rename the A.vi method in each class to "<className>_A.vi" (yes, it lets you do this and hence the bug)

7) Build this DLL and notice that no subfolders are created (if you look into this closer, you'll find that it actually is creating VIs with names "<className>_A.vi" like you told it to)

8) Test the DLL, you'll notice that no matter what you feed into the input, you'll always get the parent method output

NOTE: I actually considered hard before I posted this as a "Bug", since I would have loved it if the renaming actually worked... but I understand with the current way LabVIEW handles classes why it "shouldn't" allow me to rename class members in the build.

QUOTE (orko @ Apr 29 2009, 08:15 PM)

Here it is:

http://lavag.org/old_files/post-3266-1241062428.zip'>Download File:post-3266-1241062428.zip (LV 8.6.1)

1) Unzip and open the project

2) Build All

3) Run both test VIs. One uses the DLL built without renaming the methods, the other uses the one with renaming.

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.