Jump to content

Xcontrol Help - Convert State For Save (Ability)


Recommended Posts

Can someone shed some light on the Convert State For Save Ability and how the hell I'm suppose to freakin' use it? :(

I've no idea how to use it but I think it's there so that the developer could change the XControl and programs using that XControl won't break as the old XControl on the existing front panels can be converted to new versions of the XControl.

Link to comment
Well, the more I work with Xcontrols, the more I realize that there is a SERIOUS lack of documentation or examples for them.

Can someone shed some light on the Convert State For Save Ability and how the hell I'm suppose to freakin' use it? :(

:lightbulb: Let me shed some light.. :)

Normally when you save your VI containing the XControl (at edit time) the State data is saved with the VI. I.e. the State data is persistent as with native controls.

Now let's say you have elements in your State data that you don't want to be persistant for some reason, you could implement the Convert State For Save Ability and use this to change what ever data needs to be saved with the control. Basically you could save whatever you want by wiring the data to Display State To Save.

Now, when you use this, you need to implement code in the Init ability to read and convert back the Previous State to useable data for your XControl again.

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.