Jump to content

Drop data in XControl


Recommended Posts

Hi,

I want to use an XControl (containing at least one graph) to display one or more acquisition channel. To select channel to display, I want to implement Drag from a listbox and drop to graph "inside" my XControl.

Unforunatly, when XControl Facade.vi detect "drag enter" event on graph, Labview execution is blocked (when "accepted?" output is write).

Is it a LabVIEW bug or I forget something ?

Thanks in advance for your help

PS : It works fine with a simple graph

Link to comment

QUOTE(ptit bras @ Jul 4 2007, 04:59 PM)

Hi,

Unforunatly, when XControl Facade.vi detect "drag enter" event on graph, Labview execution is blocked (when "accepted?" output is write).

...

PS : It works fine with a simple graph

Hi ptit bras,

There have been some issues with XControls which got better with every release, I don't think drag and drop is one of those, could you post some code?

What do you mean by simple graph?

That's just a plain graph in a normal VI?

Ton

Link to comment

Hi Ton, thanks for the reply.

Here is little project to demonstrate my "bug" http://forums.lavag.org/index.php?act=attach&type=post&id=6310

I hope it is enough clear...

In addition, my goal is to do an XControl more complex therefore I need to determine on which particular object of my XControl the drop is done.

Ptit bras

PS : I work with LV8.2.1

Link to comment

QUOTE(jaegen @ Jul 9 2007, 09:02 PM)

See here ("Data Change" only fires if different data is written to the terminal, not every time any data is written to the terminal)

I don't think that's a bug, I think it is by design.

You are sure that the 'Data Change' is only fired if:

  1. Different data is written
  2. A value signalling is generated

Notify that condition 1 is also applied if a value property or local variable is used.

QUOTE(Michael_Aivaliotis @ Jul 10 2007, 11:21 AM)

I think this is a bug. I tried to simplify the example and I removed the drag enter events on the DD_Main.vi. It still locked up. Also, I tried to simplify even more... I removed drag enter event from the Facade and I only used Drag Drop. I could now see the data name (without lockup) but when I probe the get drag drop data function error out, I see error:

I would report this to NI for sure.

I think this has to do with the different application instances the 'drag' and 'drop' work in and I doubt that it can work anyway.

Ton

Link to comment

CITATION(Michael_Aivaliotis @ Jul 10 2007, 11:21 AM)

Strange, I thought this event was obligatory to "accept" the drop, and actually it is just to manage cursor icon !!!

I'll fell less idiot this evening :rolleyes:

CITATION(Michael_Aivaliotis @ Jul 10 2007, 12:12 PM)

Well, I played around a bit and I got it working.

Yes, it's work :thumbup: but what is the workaround (appart from delete drag enter event case) ???

CITATION(Michael_Aivaliotis @ Jul 10 2007, 12:12 PM)

however the drag enter still does not work.

It's shame, cursor still shows that drop is forbidden :(

Link to comment

CITATION(ptit bras @ Jul 10 2007, 12:22 PM)

Yes, it's work :thumbup: but what is the workaround (appart from delete drag enter event case) ???

I found two other diferences :

- function "to variant" in DragStarting? event => this is not useful for the workaround

- WaveformGraph local variable in "Drop" event of Facade.vi => this is the workaround, but it's very supernatural !!! If you probe output of "Get Drag Drop Data" function, the wire is empty !!!???

It works but, it seems to be risky to use this in industial application :blink:

In any case, thanks all for helping me :worship:

Link to comment

QUOTE(ptit bras @ Jul 10 2007, 02:59 PM)

I found two other diferences :

- WaveformGraph local variable in "Drop" event of Facade.vi => this is the workaround, but it's very supernatural !!! If you probe output of "Get Drag Drop Data" function, the wire is empty !!!???

uhm, could you show?

Ton

Link to comment

QUOTE(ptit bras @ Jul 10 2007, 03:30 PM)

my mistake ! :oops: I probe the wrong VI... I'm still a newbie with XControl, forget my last reply.

One ambiguity remains, what is the use of bolean "data Changed?" in "Action" cluster ?

Still sorry :headbang: :rolleyes:

set it to false, and the outside world will not know about any change in the XControl Data-value, and the next run will have the old value.

Ton

Link to comment

QUOTE(Michael_Aivaliotis @ Jul 10 2007, 02:21 AM)

I don't think this is related. The link you reference affects any control not just graphs.

Yes, this applies to any control, but if you have a graph in an XControl it's especially bad, because only the data changes are plotted - if the same value is written twice, only one point is plotted on the graph.

Jaegen

Link to comment
  • 2 weeks later...

QUOTE(ptit bras @ Jul 19 2007, 03:53 PM)

Invisble :o I don't understand, if it's invisble, events are not detected, no ? It seems to work fine if path control is visible... (NB: this drop is not detected as "Drop" event in Facade.vi)

Invisible means transparent, so you can't see it , but it is there.

Haven't checked the 'drop' event.

But then I believe a OS drag and drop isn't covered in LabVIEW (yet?)

Ton

Link to comment

CITATION(tcplomp @ Jul 19 2007, 04:42 PM)

Invisible means transparent, so you can't see it , but it is there.

Haven't checked the 'drop' event.

But then I believe a OS drag and drop isn't covered in LabVIEW (yet?)

Ton

Could you post some code, because I can't reproduce your "bug" :headbang:

The only way to reproduce the behaviour is to change path as an indicator ( but I don't think that it's your problem)

Last question, what do you mean by "external applications" (Drag from Explorer or drag from other application made with LV)

Ptit bras

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.