LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug - Class with same name, but one within a library.

Solved!
Go to solution

LabVIEW doesn't seem to be handling classes (and possibly files) with the same name, but belonging to different libraries, correctly.

  1. Create an empty project.
  2. Create a class named "Class" and add a single dynamic dispatch method named "Method".
  3. Create a library named "Library".
  4. Save all files with the above names.
  5. Within the library create a new class named "Class". This shouldn't cause any conflicts as it's part of a library.
  6. Notice how the class cannot be removed from the library now, whereas classes with a different name can (bug 1).
  7. Save the new class keeping the same name (different location to avoid overwriting), or open the save dialog and choose cancel.
  8. Notice LabVIEW has now decided there is a conflict even though there shouldn't be as one belongs to a library.
  9. Open "Method" of the original class and notice how it's broken and now attempting to use Library:Class as the input (bug 2).

See screen recording: https://drive.google.com/uc?id=0B6dFu9niJIpEMDM1WjNZQWMzTUE



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
Message 1 of 5
(1,952 Views)

Does seem strange - presumably you have also saved the changes to the Library too since its xml schema refers to the containing class.

0 Kudos
Message 2 of 5
(1,898 Views)

6) is doesn't seem a bug to me.

 

It's the same in classes. If there are two classes with a method function, you can open and remove the first from the class, but not the second. LabVIEW forbids this, since it would cause two files with the same name to be in memory.

 

Removing class from the library, would cause two class.lvclass's to be in memory. So it is not allowed. It might be inconvenient sometimes, but I think it is by design.

 

9) seem indeed like a flaw, like there are more.

 

 

Message 3 of 5
(1,883 Views)

wiebe@CARYA wrote:

6) is doesn't seem a bug to me.

 

It's the same in classes. If there are two classes with a method function, you can open and remove the first from the class, but not the second. LabVIEW forbids this, since it would cause two files with the same name to be in memory.

 

Removing class from the library, would cause two class.lvclass's to be in memory. So it is not allowed. It might be inconvenient sometimes, but I think it is by design.

What I meant was that you can't remove it from the project (my mistake in the original post) which is the red cross' function (not remove from library). Shown below with an item that can be removed.

. LabVIEW_2017-10-10_10-25-08.png

I agree that if I had dragged it outside of the library should it should cause a problem as they have the same name and hierarchy.



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 4 of 5
(1,871 Views)
Solution
Accepted by topic author matt.baker

For completeness, this has now been assigned CAR number 671590.

Only happens when right clicking on the class and selecting save not the "save all".



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 5 of 5
(1,838 Views)