06-10-2010 10:14 PM
Strict Typedef?
Please post your vi or control giving you a problem so we can see what is going on.
06-11-2010 06:00 AM
OK - have at it. If you can see anything I can't, I'd appreciate knowing how you find it.
It's a rather complicated control so there's a lot of stuff here.
It's in LV 8.6.1, where this project is working. LV 2009 fares no better with it.
--- Unzip the file into a scratch folder.
--- Open Libraries\HDT Configuration\HDT Channel.ctl
--- Try to re-size the CHANNEL cluster.
You can turn on AUTOSIZING to show the hidden items (it's big), but there are still no sizing handles.
ADVANCED\CUSTOMIZE is not available.
EDIT\CUSTOMIZE CONTROL is not available.
SET WIDTH and HEIGHT tells me "You cannot resize the object in this dimension" (for both dimensions), but won't tell me why.
It's a non-strict TYPEDEF (I need it that way), but setting that to STRICT, or plain CONTROL, has no effect.
It is not locked.
Things within it can be re-sized. (At least some can - I didn't try every item).
The CHANNEL.ctl was originated in LV7.0 or 7.1 some years ago.
It was edited successfully a few weeks ago, but that edit consisted of adding something visible, not adjusting the overall size.
The "cDAQ" cluster is on top of several other similar clusters - at runtime I implement a sort of tab scheme where only one of them is visible. This is because LV won't let me have a TAB inside of a CLUSTER.
I don't think that's relevant, as I have seen this problem on other clusters without this feature, but there it is.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-11-2010 06:13 AM
Just to repeat a couple of earlier facts:
--- If I CUT the CHANNEL control and PASTE it back into the CTL file, no change.
--- If I COPY the CHANNEL control and PASTE it into a new CTL file, no change.
--- If I COPY all the contents of the CHANNEL cluster (meaning all the hidden stuff too) and PASTE that into a new cluster in a new CTL, then the new cluster is normal.
That is a large PITA, because it doesn't preserve the cluster order of things, and since I can't put a TAB inside a CLUSTER, I have to superimpose things, and since the REORDER CONTROLS in CLUSTER flat-out doesn't work when things are superimposed (isn't it time they moved to a list for doing that?), then I have to tear it apart and re-build it to get it back where it was.
Fortunately there are only 24/25 items here, so I got it done, but that's the only way I saw to fix it.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-11-2010 09:02 AM
I'm using LV2009SP1. I see what you are talking about. And I don't have a clue as to why it is doing it. The strict typedef was a theory, and I see that it is not the case.
One thing I do see differently is that if I drop your control in a blank VI, I do see the Advanced/Customize menu. I opened the control up that way.
Attached is a copy of that control.
My guess is that there is some corruption in the way the .ctl file was saved. Whether it was because the control is such a complicated structure, or the items that overlap each other, or something else, I don't know. I kind of stumbled upon that set of steps in playing around with it. Whether the fact I'm using LV2009sp1 as opposed to LV8.6 helped, I don't know.
See how this one works for you, the one thing that may cause problems, is linkages to all the subcontrols.
06-11-2010 09:36 AM
06-11-2010 10:22 AM
OK - if I do these steps of yours:
I drop your control in a blank VI, I do see the Advanced/Customize menu. I opened the control up that way.
Then it indeed works for me, even in 8.6.
I don't have to save the control as a new name: simply changing it from a TYPEDEF to a CONTROL and saving that, then CUSTOMIZING it from a VI it's in works.
It looks to me like the action of CUSTOMIZING a TYPEDEF simply opens up the control editor with it.
My GUESS is that the action of CUSTOMIZING a non-TYPEDEF creates a NEW control (it's called CONTROL 4 or something in the editor), and THAT's what gets rid of the corruption.
Thanks for your insight. It's too late now, but I have this thread bookmarked for future use.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-11-2010 10:31 AM
CoastalMaineBird wrote:...
My GUESS is that the action of CUSTOMIZING a non-TYPEDEF creates a NEW control (it's called CONTROL 4 or something in the editor), and THAT's what gets rid of the corruption.
Thanks for your insight. It's too late now, but I have this thread bookmarked for future use.
I had the opertunity to edit a type def on a very old machine that was so slow I could actually watch as LV removed and replaced it on the diagram.
So that is a good guess.
Ben
06-11-2010 10:57 AM
I'm glad it is working for you. If you don't have to save it as a new name, that's great because it may help with some file linking. I just happened to do that so I didn't overwrite the original file in the process. I reverted it back to it several times to try different variations and confirm the steps.