Is it just me or does there appear to be a bug in the snippet code? "onState" and "offState" are initialized to NO, and then in an if/else statement one of them will be set to YES. But only one of them. Then there is a check to see if they are both YES, which doesn't seem like it could ever be true, even with multiple threads, since the values being tested are stack variables.
by Erik — Feb 02