Skip to content

Commit

Permalink
Fix decompose object fails with private data set to indicator
Browse files Browse the repository at this point in the history
It is possible to change the type of a private data cluster to
indicator, in which case the private data is currently reported empty.

Fixed by returning the value of the first control on the front panel
(works for controls AND indicators).

Closes #9
  • Loading branch information
logmanoriginal committed Jun 4, 2021
1 parent 4067f94 commit 8560981
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .vipb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VI_Package_Builder_Settings Version="2018" Created_Date="2021-03-27 21:11:16" Modified_Date="2021-05-15 08:36:24" Creator="Pascal Neuperger" Comments="" ID="bdb2aae08a0c7c7674a3cb60f5f6a820">
<VI_Package_Builder_Settings Version="2018" Created_Date="2021-03-27 21:11:16" Modified_Date="2021-06-04 23:20:58" Creator="Pascal Neuperger" Comments="" ID="b2b9808bcf7e673b50fdb48fb54d9e16">
<Library_General_Settings>
<Package_File_Name>PNR_lib_LabVIEW_Composition</Package_File_Name>
<Library_Version>1.2.1.15</Library_Version>
<Library_Version>1.2.2.17</Library_Version>
<Auto_Increment_Version>false</Auto_Increment_Version>
<Library_Source_Folder>.</Library_Source_Folder>
<Library_Output_Folder>..</Library_Output_Folder>
Expand Down Expand Up @@ -37,8 +37,7 @@ Maps and Sets require LabVIEW 2019 or higher.</Description>
<Copyright>Copyright (c) 2021, Pascal Neuperger</Copyright>
<Packager/>
<URL>https://github.com/LogMANOriginal/LabVIEW-Composition</URL>
<Release_Notes>- [#6] Fixed an issue that resulted in error 1004 when (de-)composing classes that implement interfaces in LabVIEW 2020+
- [#7] Fixed an issue that resulted in error 1401 when composing child classes whose version number is higher than their parent.</Release_Notes>
<Release_Notes>- [#9] Fixed an issue in "Decompose LabVIEW Object", which results in empty data when the private data cluster is defined as indicator.</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down Expand Up @@ -329,7 +328,7 @@ SPDX-License-Identifier: BSD-3-Clause
<Path>Composition\Compose Set.vim</Path>
<VI_Title/>
</Items_Data>
<GUID>F62E932B5B50EE8581B3FC98CB6786CB</GUID>
<GUID>FA18FA008C9DFFF78A5F3C9B8F9F310B</GUID>
</Functions_Palette_Data>
</Library_Palette_Definition>
</VI_Package_Builder_Settings>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Composition.Tests/Composition.Tests.lvlib
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<Item Name="Child.lvclass" Type="LVClass" URL="../Classes/Child/Child.lvclass"/>
<Item Name="Aggregate.lvclass" Type="LVClass" URL="../Classes/Aggregate/Aggregate.lvclass"/>
<Item Name="Broken.lvclass" Type="LVClass" URL="../Classes/Broken/Broken.lvclass"/>
<Item Name="Private Data Indicator.lvclass" Type="LVClass" URL="../Classes/Private Data Indicator/Private Data Indicator.lvclass"/>
<Item Name="Unnamed Private Data Control.lvclass" Type="LVClass" URL="../Classes/Unnamed Private Data Control/Unnamed Private Data Control.lvclass"/>
</Item>
<Item Name="Compose" Type="Folder">
<Item Name="Compose LabVIEW Object - String - Value.vi" Type="VI" URL="../Compose LabVIEW Object - String - Value.vi"/>
Expand All @@ -37,6 +39,8 @@
<Item Name="Decompose LabVIEW Object - Child - Class Name Value.vi" Type="VI" URL="../Decompose LabVIEW Object - Child - Class Name Value.vi"/>
<Item Name="Decompose LabVIEW Object - Disabled Broken Class - Private Data Cluster Count.vi" Type="VI" URL="../Decompose LabVIEW Object - Disabled Broken Class - Private Data Cluster Count.vi"/>
<Item Name="Decompose LabVIEW Object - Aggregate - Private Data Cluster Value.vi" Type="VI" URL="../Decompose LabVIEW Object - Aggregate - Private Data Cluster Value.vi"/>
<Item Name="Decompose LabVIEW Object - Private Data Indicator - Returns Private Data.vi" Type="VI" URL="../Decompose LabVIEW Object - Private Data Indicator - Returns Private Data.vi"/>
<Item Name="Decompose LabVIEW Object - Unnamed Private Data Control - Returns Private Data.vi" Type="VI" URL="../Decompose LabVIEW Object - Unnamed Private Data Control - Returns Private Data.vi"/>
</Item>
</Item>
<Item Name="Cluster" Type="Folder">
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Composition.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
<Property Name="Bld_localDestDirType" Type="Str">relativeToCommon</Property>
<Property Name="Bld_modifyLibraryFile" Type="Bool">true</Property>
<Property Name="Bld_previewCacheID" Type="Str">{6F314ACA-90D5-4015-90A0-231D4A305375}</Property>
<Property Name="Bld_version.build" Type="Int">10</Property>
<Property Name="Bld_version.build" Type="Int">11</Property>
<Property Name="Bld_version.major" Type="Int">1</Property>
<Property Name="Destination[0].destName" Type="Str">Composition.Tests.Runtime.exe</Property>
<Property Name="Destination[0].path" Type="Path">../builds/NI_AB_PROJECTNAME/Composition.Tests.Runtime/Composition.Tests.Runtime.exe</Property>
Expand Down
Binary file modified Composition/Lookup Object Hierarchy.vi
Binary file not shown.

0 comments on commit 8560981

Please sign in to comment.