Ernest Galbrun Posted August 26, 2009 Report Share Posted August 26, 2009 (edited) Better late than sorry, I have started using Xcontrols a few weeks ago, and there are two thing that keep annoying me about these, I'm wondering if I could do anything about it (and a third bonus question whose answer I'm affraid I already know) : 1. Can I make template XControl to add the utility methods I keep implementing ? 2. When I open my project, everything is locked (classes and Xcontrol) and I have to manually unlock every single XControl before I can edit any class. Is there a way to achieve this faster, or to avoid it altogether ? 3, bonus question. Since I have some methods that I implement in every XControl I make, I would like to be able to call them without specifically knowing what class my XControl belongs to. Ideally, I would make a parent XControl class that my XControl would inherit from, but I dont think I can do that. Is there some way (tricky or not) I could achieve my goal ? Edited August 26, 2009 by Ernest Galbrun Quote Link to comment
Ton Plomp Posted August 26, 2009 Report Share Posted August 26, 2009 Better late than sorry, I have started using Xcontrols a few weeks ago, and there are two thing that keep annoying me about these, I'm wondering if I could do anything about it (and a third bonus question whose answer I'm affraid I already know) : 1. Can I make template XControl to add the utility methods I keep implementing ? I have never tried to put an XControl in the templates folder, just go ahead and try, however the default XControl is located under \resource\Framework\Providers\xi\xctl.llb 2. When I open my project, everything is locked (classes and Xcontrol) and I have to manually unlock every single XControl before I can edit any class. Is there a way to achieve this faster, or to avoid it altogether ? That is only so if a VI is in memory that has a reference to that XControl, I think you have some deadlock between a class and an XControl. Classes are always loaded into memory, if this has a reference to the xcontrol somehow (in the probe for instance), the XControl is locked. If the XControl has a reference to the class the class is locked. 3, bonus question. Since I have some methods that I implement in every XControl I make, I would like to be able to call them without specifically knowing what class my XControl belongs to. Ideally, I would make a parent XControl class that my XControl would inherit from, but I dont think I can do that. Is there some way (tricky or not) I could achieve my goal ? Unfortunatly we cannot place an XControl inside the control class of LabVIEW to achieve such behaviour. Ton Quote Link to comment
Ernest Galbrun Posted August 26, 2009 Author Report Share Posted August 26, 2009 (edited) I have never tried to put an XControl in the templates folder, just go ahead and try, however the default XControl is located under \resource\Framework\Providers\xi\xctl.llb Putting it in the template folder doesn't work. Changig the default xctl would suit me well, although I can't manage to change the control data types in the vis, do you know why/how to override this lock ? That is only so if a VI is in memory that has a reference to that XControl, I think you have some deadlock between a class and an XControl. Classes are always loaded into memory, if this has a reference to the xcontrol somehow (in the probe for instance), the XControl is locked. If the XControl has a reference to the class the class is locked. Every XControl has an object as its data type, I guess that is why the class is locked when the Xcontrol is locked. What I do not understand is why eveerything is locked by default when I open a project, and I am wondering if there is any way (key shortcut, anything) to unlock everything at once ? Edited August 26, 2009 by Ernest Galbrun Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.