Jump to content

XControl Using Display State Change for temporary internal data storage


Recommended Posts

I understand that the Display State control of an XControl can be used to store the current internal state of the XControl. One thing I don't like however is that every time you update this data from within the Facade and set the State Changed? value to TRUE, it triggers the caller VI using the XControl to show an asterix in the Titlebar which indicates that the VI has changed. I understand why this is happening, however it's not desirable if you're just keeping some temporary internal values in the XControl which only last for the current lifetime and you don't care about saving them.

One alternative I guess would be to use an un-initialized shift register on the Facade VI to keep these variables and not use the Display State data. One limitation with this method is that the data would only be accessible from the Facade and not from the Methods and Properties. Another possibility would be to create a LabVIEW Class for the XControl. I want to avoid that since I don't want to open another can of worms. I'm already having enough trouble trying to get my XControl implemented in the first place.

Link to comment
I'm already having enough trouble trying to get my XControl implemented in the first place.

Aren't we all? :P

I used the USR for an example located here. I'm gonna have to make time to learn about LVOOP sooner or later, but I wanted to make it a bit later... I wish XControls behaved more like a control than "fancy transparent subpanels with a single terminal input/output" :thumbdown:

Link to comment
I wish XControls behaved more like a control than "fancy transparent subpanels with a single terminal input/output" :thumbdown:

That's what custom probes effectively are. We prototyped the XControls along the same lines -- an enum in to say what to do, a set of values out that were evaluated depending upon what value of the enum was used. Looked a lot like a functional global. Didn't work so well... when it only runs occassionally, as custom probes do when they have data values to update, you lose a lot of the live display potential of the XControl.

Link to comment
I wish XControls behaved more like a control than "fancy transparent subpanels with a single terminal input/output" :thumbdown:
Well, I'm not too upset with the current implementation. What I find a little annoying is to make all those Method and property VI's. Then you need to do more work in the Facade. What I would like to see instead is just let us register the methods and properties RIGHT INSIDE the Facade event structure. Then we can do the work in one place. This could potentially be done along the same lines as dynamic event registration. An additional side benefit would be that you now will know exactly what property fired and when.
Link to comment
when it only runs occassionally, as custom probes do when they have data values to update, you lose a lot of the live display potential of the XControl.

Yes, right now they are called as a handler. NI could change the behaviour and make them run continously. I have often many windows running in parallel, handling their own events. New data could arrive in the event structure.

I like the idea for registering properties, creating custom events.

Joris

Link to comment

:D NI might not like my description, but it's how I've come to look at them. They aren't bad, just a bit awkward for a left-handed dyslexic like myself :wacko: .

Michael's info regarding the ability to group/tree the props with the colon : in the name is a nice feature, but a perfect example of the general lack of documentation for XControls.

I think eControl (editable Control) or iControl (to denote personalizable) might have been a more appropriate name. When I think of XControl, I think EXTREME like wrestling, skateboarding, or my own global free, sequence structure free and better than you coding style :laugh: .

I've imagined using XControls, LVOOP and Jarrod Slocum's Linked Object List in LabVIEW 8.0 Using XControls technique to create a configurable toolbar or ribbon consisting of icons, rings and such. I don't spend a lot of my time programming for the UI, but I think the parts exist to make such a thing.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.