01-02-2008 10:24 AM
01-02-2008 11:26 AM - edited 01-02-2008 11:28 AM
01-02-2008 11:31 AM
I changed the vi you created to customize the tab control and turn it into a type def. Now when you update the control, all the constants will update with it.
Tom
01-02-2008 12:05 PM
Forgive if i missunderstood, but, wouldn't it be easier putting the constant number ( ex: "0"(zero) in the property "Value" of the table or its local variable) of the page instead of the enum constant?
That way, the only problem is when you try to load a page number that doens't exists.
01-02-2008 03:53 PM
Mr. Bau,
I tried doing that at first, but LV would not let me wire a constant because Values was expecting an enumeration.
01-03-2008 04:54 AM
01-03-2008 05:44 AM
Hi Yves,
The enum wire breaking is a good thing. It lets you know you should think aout the pages and how they are numbered.
But an better option is to use typedef'd enums (as mentioned earlier).
The big issue arises when you re-arrange tab pages. If you use the numeric contstants, your approach will still run but the pages dispalyed could be wrong.
If you define typedef'd enum, and use it in your diagrams instead of the numerics, you only have to edit the typedef once and all occunces get updated. I used to find it frustrating that I would have go back and change a lot of contstants (and find them!) before I learned to used typedef'd enums.
Try it, you'll like it.
Ben
01-03-2008 06:12 AM