05-30-2008 01:28 PM
05-30-2008 01:31 PM
05-30-2008 03:26 PM
So now that I am usinig clusters it seems it might get a bit messy for this disabling (or enable). Am I going to need to make a reference for each and every cluster element?
Isn't there a way to pass the whole thing and disable/enable depending on an array of enables?
06-02-2008 07:38 AM - edited 06-02-2008 07:41 AM
Let me start by saying that I have not read all of the above replies so please forgive if I missed something.
I have used Action Engines specifically designed for that purpose to control and manage the properties of FP objects.
The actions (roughly outlined) were;
1) Init - Pass in a typedef'd cluster that has references for all of the objects that will need managed.
2) Set_X_Mode - Set the properties (visability, enable disable, ext) of the objects associated with Mode_X. Push this mode info onto an internal stack in the AE.
3) Set_Y_Mode - same as above but set visablity of Mode_Y.
4) Pop_Mode - Pops the last mode pushed onto the stack and applies its settings.
...
This appraoch allows me to keep my GUI code clean with actions that document what I am doing plus it also allows me to backup-up if the user hits "Back". It also puts all of the GUI property functions in a single VI so if there is an issue I know where to look. It also helps me make sure no two parts of my code are fighting with each other over who gets to set what property when.
Just trying to help,
Ben
06-02-2008 01:12 PM
Very usefull nugget but I am not sure if it covers my needs last stated.
I believe I would still be stuck sending numerous references to numerous controls:( Which would of course make the top level code very messy. Maybe I am missing something....
06-02-2008 01:22 PM - edited 06-02-2008 01:23 PM
I should have said more...
1) Init - Pass in a typedef'd cluster that has references for all of the objects that will need managed. Place this cluster in a shfte register inside the AE so that all control references are available for any latter actions. If the cluster is typedef'd and the cluster elements are labled to corespond with the control they will contain, finding the proper references is made easier using unbundle by name.
The following image was taken for a different Q but can help a little.
I bundle all of the ref's once when the code starts and pass it to the AE (not shown)
Inside the AE those refs get put a SR.
All other actions operate using the ref's stored in the cluster that is in the SR.
Ben
06-02-2008 02:02 PM
Ahhhh... I see now.
Well I am off to make some controls... This may take a while but it will deffinately help. THank you!