08-16-2006 01:44 PM
08-17-2006 11:22 AM
First, I'll suggest the simple suggestion - avoid ActiveX and go for what's simpler and more elegant. Simply have the user click in a game array with alternating clicks determining whether it's X or O. You can figure out how to detect the clicked cell yourself or you can try taking a look at the VI posted here for some reference.
As for how to generalize this, the first solution which pops to mind would be to subVI the code you have on the top. Make the control reference a control (which you can get from the event terminal) and make the ActiveX references an array. Build the array once outside your main loop and wire the array into the subVI. Then, auto index it to find whether your control overlaps one of its elements.
08-17-2006 12:06 PM
Awesome tst thanks, i'm gonna go play things for a moment and see what i come up with... I like the idea of making the activex refs an array so i can just index through them. I think that'll work. Oh and I could make the tic tac toe game really easily other ways, I'm just doing it this way to learn. It's not for the coding challenge just for my own advancement.
thanks again
08-17-2006 12:14 PM