LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Drag Drop Data

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?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 2
(2,570 Views)

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.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 2
(2,526 Views)