08-17-2006 01:26 PM
08-17-2006 01:39 PM
08-17-2006 02:39 PM
As asked, I'm here as well, to add to Jarrod's answer.
He told you how to check if a reference is valid, and I'm here to say that I have no idea why your VI is crashing.
You're registering for a mouse down on a list of existing controls. Therefore, the event should fire only if you click the mouse while it's over one of those controls and you should have no reason to check for an invalid control. Even if you would have registered for a non existing control, the event structure should simply not have fired. If LV's crashing, then something is wrong. I ran your VI and it did not crash. Did you do any changes to it?
08-17-2006 02:47 PM - edited 08-17-2006 02:47 PM
Message Edited by Jarrod S. on 08-17-2006 02:48 PM
08-17-2006 03:35 PM
You're right. I was looking at an older version of the code.
In any case, the program shouldn't crash, but the property node should throw an error. Since you don't have the error out terminal wired, and it's likely you have automatic error handling enabled, LV will immediately display a dialog with the error info (which I assume is the problem you refered to). You can get rid of this dialog either by disabling auto error handling or by wiring the error out terminal into something. In general, it is very important to handle errors properly, but that is a very big discussion and we can't go into it.