09-07-2009 05:08 PM
09-07-2009 06:42 PM
09-07-2009 06:50 PM
09-08-2009 01:52 AM
09-08-2009 02:22 AM
SnowForest wrote:
[...]Then I set one VI to run state which use this XControl. [...]
This is not true. It's already sufficient to load a VI using the XControl.
Ok, and here is what's happening:
A XControl is a set of VIs and controls collected in a special library (lvlib => xctl). There are four mandatory parts:
- Facade.vi: This defines the visual appearance and the main behavior of the XControl
- Init.vi: Used for versioning XControls
- Data.ctl: The data the XControl should present as control for the VI using it. This could be any type
- State.ctl: Internal data for the XControl mainly used in the facade and subvis as for instance methods and properties
The facade.vi has to be reentrant since it must instanciate for each location it is used. Additionally, the setting for the frontpanel removes the title bar during runtime.
If a VI uses the XControl (so the facade), the XControl is set to run mode which will lead to all facades (regardless if they are used in a VI or opened otherwise) being displayed as defined in it's window appearance. This is the reason why the facade cannot be closed anymore as soon as any VI is loaded into memory using this XControl.
hope this helps,
Norbert
09-08-2009 07:59 AM