09-24-2013 05:30 AM
Old bug that appears in lots of LV versions (haven't tried 2013).
When replacing a cluster style (classic, modern, silver) it's emptied and all elements inside is lost. Since it's a graphical representation that shouldn't affect the data that shouldn't happen.
Reproduce:
Place cluster
Place data elements inside
Replace cluster with another style
Cluster emptied.
/Y
09-24-2013 04:52 PM
Cluster emptied with LV2013.
09-24-2013 04:58 PM
That CAR is so old I bet it has letters in it.....
09-24-2013 05:05 PM - edited 09-24-2013 05:10 PM
@Yamaeda wrote:
Old bug that appears in lots of LV versions (haven't tried 2013).
When replacing a cluster style (classic, modern, silver) it's emptied and all elements inside is lost. Since it's a graphical representation that shouldn't affect the data that shouldn't happen.
Reproduce:
Place cluster
Place data elements inside
Replace cluster with another style
Cluster emptied.
/Y
Got news for you. It even empties out if you replace it with a cluster of the same style. I suspect it's because it replaces your cluster with a new, empty one. It's also quite consistent. This happens wth arrays, also.
[edit]
Curiously, it does NOT happen with tab controls.
[/edit]
09-24-2013 05:10 PM
09-24-2013 07:33 PM
@ouadji wrote:
09-24-2013 09:14 PM - edited 09-24-2013 09:40 PM
"Replace" Cluster control with empty cluster control gives you an empty cluster. EXPECTED
This is what type defs are for. Edit and apply changes to a type def cluster control (Be careful of changes to default values for elements if you go "Strict")
New...Control,,,,, make it a *.ctt, Control, Type def control or Strict type def control and "Replace" works the way the OP seams to want (and the way I expect)
Sorry guys and gals, I don't even expect that a "Replace" error in (no error) from "Classic" with Error In from "Silver" to change the lable since neither is "Strict"ly typed.
Now, I know I'm pressing it by dumping on another reported bug and declairing it "Expected." Controls, and the control editor could stand a serious upgrade! What the OP posted is a flaw that needs attention but has workarounds if you read the help file and follow the LabVIEW FP object rules. I would not be adverse to a major FP object upgrade but, type propogation would need to be bi-directional before this new feature could exist. Again, I'm not opposed to a major revision of FP objects but, they do work the way they work today.
<I hate tabs mode>
Oh, and Tabs are NOT Controls, they are "containers". Let me use an ananology, "Milk" is a base data type. It may be one of several types of milk (Whole , Skim, %x) Replacing "Whole Pasturized Organically grown %1Milk (from a cow)" with "Milk" should provide the default type of the base class. However, I would expect changing a container would not change its contents. Pouring %1 Milk from "Carton" to "Pitcher" should result in the change of "%1Milk in a Carton" to "%1Milk in a pitcher." Clusters and arrays are controls not containers. Type def a Tab with contents and see the difference. Yup replacing the container with a new type of container does not bring the contents of the old type. Containers have no contents until they are filled with something.
</I hate tabs mode>
09-24-2013 09:37 PM
09-25-2013 02:30 AM - edited 09-25-2013 02:31 AM
@JÞB wrote:
"Replace" Cluster control with empty cluster control gives you an empty cluster. EXPECTED
This is what type defs are for. Edit and apply changes to a type def cluster control (Be careful of changes to default values for elements if you go "Strict")
I guess that's a matter of perspective. I see it as replacing a cluster STYLE with another STYLE. They're both clusters, Structs, and the data is/should be unaffected.
Yes, a type def works as a workaround as i can replace the cluster and quickly build the data be inserting the type-def, that's not the point. In the RGC-thread we see lots of "workarounds". 😉
And yes, i guess this CAR is so old there's just rust and holes left in the chassis ...
/Y
09-25-2013 05:30 AM
BTW, it works with Error clusters!
/Y