Jump to content

XControl:Abilities:Init Ability VI: Difference between revisions

From LabVIEW Wiki
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
{| align="right" border="0"
|__TOC__
|-
|}
==Init Ability VI==
The Init ability is used to initialize an instance/run of an [[XControl]]. It allows for converting from an older version of the XControl to maintain data-persistance. For this function the version numbering of the XControl is used.
The Init ability is used to initialize an instance/run of an [[XControl]]. It allows for converting from an older version of the XControl to maintain data-persistance. For this function the version numbering of the XControl is used.
Besides upgrades it gives the option to have seperate default values for controls and indicators.
Besides upgrades it gives the option to have seperate default values for controls and indicators.
Line 10: Line 4:
==Init VI tricks==
==Init VI tricks==
* Unfortunately there is no way to detect why the Init VI was called (drop or load from disk). One way can be using a special flag-value inside the ''State'' value as shown by Stephen Mercer of [[National Instruments]] in his [http://community.ni.com/examples/scrolling-led-xcontrol rolling LED display] where this is used to force the drop of an indicator instead of the standard control.
* Unfortunately there is no way to detect why the Init VI was called (drop or load from disk). One way can be using a special flag-value inside the ''State'' value as shown by Stephen Mercer of [[National Instruments]] in his [http://community.ni.com/examples/scrolling-led-xcontrol rolling LED display] where this is used to force the drop of an indicator instead of the standard control.
* Although it is not fool-proof an initial drop is indicated by a Previous version number of 0.0.0.0
* Since the [[XControl:Abilities:Facade_Ability_VI#Display_State_Change|Display state event]] is triggered by the Init VI this can be used for messaging.
* Since the [[XControl:Abilities:Facade_Ability_VI#Display_State_Change|Display state event]] is triggered by the Init VI this can be used for messaging.
[[Category:XControl|Init]]

Latest revision as of 16:40, 18 February 2008

The Init ability is used to initialize an instance/run of an XControl. It allows for converting from an older version of the XControl to maintain data-persistance. For this function the version numbering of the XControl is used. Besides upgrades it gives the option to have seperate default values for controls and indicators.

Init VI tricks

  • Unfortunately there is no way to detect why the Init VI was called (drop or load from disk). One way can be using a special flag-value inside the State value as shown by Stephen Mercer of National Instruments in his rolling LED display where this is used to force the drop of an indicator instead of the standard control.
  • Although it is not fool-proof an initial drop is indicated by a Previous version number of 0.0.0.0
  • Since the Display state event is triggered by the Init VI this can be used for messaging.