09-13-2010 06:19 PM
Hi /Y
Thnak you for the suggestions. I have had a good learning experience with this one. My first serious go at dynamic vi's, and your tips certainly reduced my code significantly
The idea of using the modulo functionm is interesting to remove the select, less or equal to and increment functions, but even though I could code it in text-based editors I'm stumped as to how to implement it here.
As I said in my OP, the leds are only to debug, so I wasn't concerned about the niceties of the code. They will be removed once the pages go in.
I have reattached the code with the rewrites, and would once again value your opinion.
Regards
Ray
09-14-2010 01:26 AM
Hi Ray,
User events is good training, but in this case not necessary at all (depending on if you want to optimize the code or get the training). In the Pane event you fire a user event, you can just skip the user event all together and change your existing PageS-event to Pane:MouseDown. 😉
Modulo is Quotient & Remainder in Numeric functions group. It'll give both "(int) x/y" and "x/y - (int) x/y" i.e. "x%y" as outputs.
As you're starting to notice LV has many good built in functions, making it easy to reduce code.
/Y
09-15-2010 02:17 PM
For a moment I got confused as to which Ray was being referred to 😉