LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Confused about using accessors with classes -

Solved!
Go to solution

F1_Fan wrote:

I think I'm starting to wrap my head around this.....

 

Lets say I have 3 different calculations to complete -

 

i. I have one ctl for the calculation class.

ii. I have 3 methods inside this class; one for each calculation.

iii. Perhaps the control has 18 objects (is this the correct term???) inside; only 8 need to be exposed via accessors as the rest are used internal of the class.

iv. I would code 8 accessor vi's to allow me to set and get the required data.

 

If the above sounds good; my only question is how to I deal with the problem of requesting say calculation #3 but I need to complete calculation #1 first before #3 can be completed? Is it possible to do that without using a case structure with recursive calls?

 

This is all very interesting but confusing at the same time....

Message Edited by F1_Fan on 01-13-2010 12:48 PM

 

Then you have obviously missed someting Smiley Happy

 

Children can call the methods of their parrents.

 

Child methods can also call themselves recursively.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 13
(767 Views)

Here are two options (there are others as well):

  1. Do the calculations in a single VI.
  2. Keep a flag inside the class (let's say a boolean called "Completed Calc 1") and check that flag inside the Calc 3 VI. If it's false, you can return an error.

___________________
Try to take over the world!
0 Kudos
Message 12 of 13
(766 Views)

tst wrote:

Here are two options (there are others as well):

  1. Do the calculations in a single VI.
  2. Keep a flag inside the class (let's say a boolean called "Completed Calc 1") and check that flag inside the Calc 3 VI. If it's false, you can return an error.

...and again, a variant of 1, which uses recursion... Smiley Happy

0 Kudos
Message 13 of 13
(740 Views)