09-10-2007 06:23 PM
Tst,
Ha, I just re-read the end of your last post, "P.S. No, I don't know how to access these in LV 8.x".
I didn't know what you meant at the time, but I do now (LOL)!
Does anyone know if tags are a (hidden) feature that is not going to be supported in the future?
As another approach, could I use control references, and are they (the references) persistant over application launches (ie staticly assigned at compile time, not likely) or do the references change each time the exe is run (likely). What other method(s) would be the most reliable in saving control state info?
09-11-2007 02:22 AM
I believe tags are available in the RTE (at least for reading), but that would have to be tested. I also believe that they're not going to go away - the very fact that you got a help page for a feature which is private is a good indication of that.
Private features are a problem - they are undocumented, unsupported, may cause crashes, may not work as expected, may change their interface or implementation between versions or may disappear at some version. That's why they're not exposed.
I don't believe object tags will suffer that fate (in fact, NI probably uses them in its own code), but then again, they have been around for at least 5 versions of LV and they're still private, so that's not a very good sign. If you put them in production code, you *might* find out that your application your crash and that you won't get support from NI. I don't think it will, but there is no way to tell.
You could try looking at the LAVA forums' scripting board to see if there is any way to access these in LV 8.x, but essentially they now require a license (which most people can't get) and any workaround will require using tricks.
Object references are not persistent between runs, which is why I said this would pretty much be the only solution - it allows you to hold the data with the object itself. The only other option, really, is to save the data in a file by control label, but that means that you then can't rename your controls, you can't have controls with duplicate labels, you have to account for special characters and you can't operate on decorations.
Just for fun, here's a very basic example I put together of how something like this might work based on your idea of maintaining the original ratio. Obviously, a real system would have to encapsulate everything and handle position and other things as well, but I believe this shows the problems (and the potential) nicely.
09-11-2007 03:40 AM
09-11-2007 08:16 AM
I did a quick and dirty test last night, where I just handled everything in the resize event. I scaled the control width/height, the x/y position, and the font for a few different controls. The text box and switch looked great. However a control like the modern led button suffered from what I believe to be internal scaling errors (see pic attached). I could be wrong, but I believe that for sucessful scaling to occur on compound controls (Controls built from multiple components) the internal position / bounds for the subcomponents need to be stored as singles, not integers. This of course is just my hypothisis, and hopefully someone who knows better will tell me I'm wrong (Because I'd be happy to be!)
Howard
09-11-2007 08:25 AM
Hi Wiebe,
I hate to say it, but I'm new to the Labview environment (but not application development). How do I "Look at the LabVIEW.exe export function ResizeObjFromRef"? Is their a tool in Labview to do this?
Thanks!
09-11-2007 10:10 AM
09-11-2007 10:10 AM
09-11-2007 11:33 AM
09-11-2007 12:06 PM
Is the function definition documented somewhere? I tried to config it, but it keeps throwing exceptions.
wiebe@CARYA wrote:
It uses a reference, Dx and Dy
09-12-2007 03:40 AM