08-27-2012 10:07 PM - edited 08-27-2012 10:07 PM
There is a property of an x control I want to only set from one specific VI. I don't want the programmer to be able to set this property, but I want to be able to access it in one location (a loop I'm running the background, but that should be the only place this particular property of the X control should be updated from). It seems access scope doesn't apply to properties and methods of an X Control. Is there any way I can do this, or am I out of luck?
08-28-2012 02:42 AM
Hey imstuck,
I'm afraid we're doomed on this one.
The Xcontrol's class properties have default attributes concerning the privacy (false) and the need for scripting (false), 2 major attributes for regular VI Server properties/methods. Of course, an XCtrl is not a persistent class but the mechanism for the property creation is the same, and as we can't set the privacy of the property, it will always display.
The access scope is just for executing the property/method VI inside or outside the Xcontrol just like any other library VI.
The weird part is that the access scope does not exist for properties in the Item Settings page of the xcontrol... Something to look at !
Best regards,
Eric
Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.
08-28-2012 06:29 AM
Do you actually need a property for this? If you planned on it being private, it's probably part of the XCtl anyway, so you might be able to manage it by firing up a daemon when the XCtl is fired up and pass a user event/queue/control reference/etc. to allow the daemon to do what you need. You then stop the daemon when the XCtl is uninited. There's one example here - http://lavag.org/topic/13267-x-control-with-parallel-process/
08-28-2012 07:25 AM
@tst wrote:
Do you actually need a property for this? If you planned on it being private, it's probably part of the XCtl anyway, so you might be able to manage it by firing up a daemon when the XCtl is fired up and pass a user event/queue/control reference/etc. to allow the daemon to do what you need. You then stop the daemon when the XCtl is uninited. There's one example here - http://lavag.org/topic/13267-x-control-with-parallel-process/
"Roll-your-own"
My thought exactly Yair!
Ben
08-28-2012 11:03 AM
@Eric.M wrote:
Hey imstuck,
I'm afraid we're doomed on this one.
The Xcontrol's class properties have default attributes concerning the privacy (false) and the need for scripting (false), 2 major attributes for regular VI Server properties/methods. Of course, an XCtrl is not a persistent class but the mechanism for the property creation is the same, and as we can't set the privacy of the property, it will always display.
The access scope is just for executing the property/method VI inside or outside the Xcontrol just like any other library VI.
The weird part is that the access scope does not exist for properties in the Item Settings page of the xcontrol... Something to look at !
Best regards,
Eric
Thanks for your feedback. I figured this was the case, and I also know this is a strange request with very limited use cases, but it was worth a shot.