02-17-2007 12:19 PM
Well, I wasn't aware that Commander handled dependencies, or I would have reported it.
Thanks for all the new releases.
02-17-2007 12:46 PM - edited 02-17-2007 12:46 PM
@tst wrote:
Well, I wasn't aware that Commander handled dependencies, or I would have reported it.
Thanks for all the new releases.

Message Edited by Jim Kring on 02-17-2007 10:48 AM
02-17-2007 02:23 PM
Incidentally, since we're talking about this package, there is a part of it which may be considered a bug (I'm not sure) - the package does not delete data from the file when data is deprecated from the cluster.
If this is a cluster element, then this is no big deal, because the extraneous element is simply ignored, but if you do this with an array with 3 elements when a previous version had 5 elements then the previous two elements will stay even though you only wrote a 3 element array.
I don't think this will affect anything other than arrays since they are the only variable-length structures which are based on elements.
Suggested solutions - add the size of the array dimensions (or if it's not found use the current method for legacy support) or delete the key before adding (race condition potential and changes the order in the file, not very nice in general).
BTW, I ran across this issue when I had to work on an application written by someone else while doing minimal changes. That application has a large main VI which does most of the work on a cluster which holds the data and is accessed through a local (luckily, only in one loop, so the data locking is OK). The VIs which were used to save and load the cluster were about 2 MB each and handled each element individually, so changing to the OpenG code was a welcome change.
Since the cluster holds some variable sized arrays I ran into this issue. My quick fix was to create a backup, delete the original, write the new version and then delete the backup, but this is obviously not a very nice solution. Due to time constraints I couldn't refactor the application to use GOOP either, which would probably have benefited it too, but that would "take too much time", of course.
P.S. If you think this is worth a discussion in the OpenG board, you can simply copy this text.
02-17-2007 08:16 PM - edited 02-17-2007 08:16 PM
Message Edited by Jim Kring on 02-17-2007 06:16 PM