09-22-2008 01:55 PM
I have been trying to get labview to copy data from a FP table onto the clipboard. One method I found was to register for the mouse entering table event. If true then send true value to a case structure that has another event structure that waits for a Ctrl-C, then copy the selected cells.
This works fine except for one problem. If any key is held down while the mouse cursor enters the table the FP hangs. Does anyone know why this happens? I have tried to filter key down events but still can't prevent the program from hanging.
I am currently using v8.0. Will try on a different machine with 8.5 to see if it makes a difference.
09-22-2008 01:59 PM - edited 09-22-2008 02:01 PM
By default, events lock the front panel until they complete. There is a chekbox on the event configuration panel to turn that off.
BDS wrote:If true then send true value to a case structure that has another event structure that waits for a Ctrl-C, then copy the selected cells.
This makes little sense. Event structures should not be inside case structures, for example. Can you show us your code?
09-22-2008 02:14 PM
09-22-2008 02:26 PM
I was mistaken, If I filter and discard the key down then the mouse over works. But then, it hangs in the second structure when a key is pressed.
See attached vi.
09-22-2008 02:27 PM
09-22-2008 02:37 PM
OK, now we see some code. 😉
Your program is fundamentally flawed. Event structures are always active, not just when they are in the dataflow.
You should use one single event structure and one single while loop. You can keep state information (mouse entered, mouse left) in a shift register. Also, your timeout case is not used, so delete it. If you don't wire a timeout, it is infinite.
09-22-2008 03:01 PM
09-22-2008 04:31 PM
Thanks!
I think I understand event structures much better now.