09-10-2014 11:42 AM
The HELP text for the GET DRAG DROP DATA function says this:
"Only use this function when it is necessary to access the drag data, not just to examine the data type."
Can anyone explain why this is?
Is it costly, in terms of time, or memory, or something else?
Is it destructive to the data ?
Why?
I have a situation where dragging ONE of something is OK, but dragging TWO or more is not, in certain circumstances.
In other circumstances, dragging one or more is OK.
So how do I detect (in the DRAG OVER event) whether the drag data has one or two items in it?
If I change the DATA NAME to ITEM 1 or ITEM 2, then I don't know what name to look for when I do fetch the data.
Do I create a different item called DRAG COUNT SINGLE or DRAG COUNT MULTIPLE and look for the existence of one or the other of those?
I could use some outside-the-drag storage places, but that seems yucky - it's not self-contained.
Ideas?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-12-2014 07:31 AM
For the record, here's one way around the issue.
At DRAG STARTING time, I compose the DRAG DATA NAME with a FORMAT STRING of "My Items %d", embedding the count in the name itself.
At DRAG OVER or DROP time, instead of searching the AVAILABLE DATA NAMES for an exact match to a fixed name, I SCAN STRING on each available data name, using the same FORMAT STRING. If I scan without error, then I have the number of items dragged and I can make appropriate decisions.
Tech Support says that I might be reading the warning a bit too seriously anyway.
Blog for (mostly LabVIEW) programmers: Tips And Tricks