01-13-2010 01:07 PM
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
Children can call the methods of their parrents.
Child methods can also call themselves recursively.
Ben
01-13-2010 01:10 PM
Here are two options (there are others as well):
01-14-2010 01:01 AM
tst wrote:Here are two options (there are others as well):
- Do the calculations in a single VI.
- 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...