LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search 1D Array complexity

Solved!
Go to solution
Well, I've tried to save LVOOP objects as variant attributes, but I suspect that not all the data members of the objects are getting stored properly in the attributes. For instance, I have a private member called "name" that never comes back initialized, even though it goes in initialized. Also, I'm getting the base class back rather than the derived class I put in. So I suspect that variant attributes don't get along too well with LVOOP.

Any confirmation or refutation appreciated. Will cook up a simple example and post.

Thanks,
- Steve.



Message Edited by SPM on 06-24-2008 05:05 PM
0 Kudos
Message 11 of 16
(988 Views)
OK, here's a simple example. Run the "Run Me" VI, then clear, set, and get.

It occurs to me that the problem can be worked around by using an array to store the objects and saving an index to the array as a variant attribute.

Cheers,
- Steve.

0 Kudos
Message 12 of 16
(979 Views)
Update: Tried the workaround and it still doesn't work. It looks like the derived class of the object and the private data are being lost in the tunnel out of the case structure in the registry VI. Smiley Sad

- Steve.



Message Edited by SPM on 06-24-2008 06:24 PM
0 Kudos
Message 13 of 16
(973 Views)
Update: Found the problem. Putting the loop inside a case structure doesn't work for some reason. Moving it outside the error case works.

Why? Beats me... Smiley Surprised

- Steve.
0 Kudos
Message 14 of 16
(945 Views)
Take a *really close* look at your "Set" case on Registry.vi.

There's a wire that runs out from the edge of your case structure to the edge of the while loop. Right click on it and choose "Clean up wire".  What you'll discover is that your output isn't actually wired to the thing you think it is wired to.
0 Kudos
Message 15 of 16
(931 Views)
Thanks, Aristos. I got that one yesterday. Smiley Happy

But it wasn't what was causing the problem. Smiley Sad

-S.



Message Edited by SPM on 06-25-2008 05:01 PM
0 Kudos
Message 16 of 16
(927 Views)