Olivier Jourdan Posted July 5, 2007 Report Share Posted July 5, 2007 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 Quote Link to comment
Ton Plomp Posted July 6, 2007 Report Share Posted July 6, 2007 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 Quote Link to comment
Olivier Jourdan Posted July 6, 2007 Author Report Share Posted July 6, 2007 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 Quote Link to comment
Olivier Jourdan Posted July 10, 2007 Author Report Share Posted July 10, 2007 Until better XControl turns up, I found a workaround using Subpanel, clone and dynamic VI load It's less simple, less reusable and less powerful, but it works... Quote Link to comment
jaegen Posted July 10, 2007 Report Share Posted July 10, 2007 Just FYI - there are some real issues with using a graph inside an XControl. See here ("Data Change" only fires if different data is written to the terminal, not every time any data is written to the terminal) Jaegen Quote Link to comment
Michael Aivaliotis Posted July 11, 2007 Report Share Posted July 11, 2007 QUOTE(jaegen @ Jul 9 2007, 12:02 PM) Just FYI - there are some real issues with using a graph inside an XControl.See here ("Data Change" only fires if different data is written to the terminal, not every time any data is written to the terminal) Jaegen I don't think this is related. The link you reference affects any control not just graphs. QUOTE(ptit bras @ Jul 4 2007, 07:59 AM) Is it a LabVIEW bug or I forget something ? 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: http://forums.lavag.org/index.php?act=attach&type=post&id=6334''>http://forums.lavag.org/index.php?act=attach&type=post&id=6334'>http://forums.lavag.org/index.php?act=attach&type=post&id=6334 I would report this to NI for sure. Quote Link to comment
Ton Plomp Posted July 11, 2007 Report Share Posted July 11, 2007 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: Different data is written 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 Quote Link to comment
Michael Aivaliotis Posted July 11, 2007 Report Share Posted July 11, 2007 Well, I played around a bit and I got it working. You can now drop data onto the graph, however the drag enter still does not work. See attached (8.2.1). Quote Link to comment
Olivier Jourdan Posted July 11, 2007 Author Report Share Posted July 11, 2007 CITATION(Michael_Aivaliotis @ Jul 10 2007, 11:21 AM) I removed drag enter event 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 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 Quote Link to comment
Olivier Jourdan Posted July 11, 2007 Author Report Share Posted July 11, 2007 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 In any case, thanks all for helping me :worship: Quote Link to comment
Ton Plomp Posted July 11, 2007 Report Share Posted July 11, 2007 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 Quote Link to comment
Olivier Jourdan Posted July 11, 2007 Author Report Share Posted July 11, 2007 CITATION(tcplomp @ Jul 10 2007, 03:09 PM) uhm, could you show?Ton my mistake ! 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: Quote Link to comment
Ton Plomp Posted July 11, 2007 Report Share Posted July 11, 2007 QUOTE(ptit bras @ Jul 10 2007, 03:30 PM) my mistake ! 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: 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 Quote Link to comment
jaegen Posted July 11, 2007 Report Share Posted July 11, 2007 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 Quote Link to comment
Ton Plomp Posted July 20, 2007 Report Share Posted July 20, 2007 Another mind breaker. NI has allowed drag and drop of filenames on path controls from external applications. This does not work if the path is in a XControl. Does anyone know how to achieve this in G. Ton Quote Link to comment
Olivier Jourdan Posted July 20, 2007 Author Report Share Posted July 20, 2007 CITATION(tcplomp @ Jul 19 2007, 02:28 PM) This does not work if the path is in a XControl. Hi, One question Ton, in your XControl, the drop target is a "path" control/indicator or a sting like in Truncate Path Xcontrol ? Ptit bras Quote Link to comment
Ton Plomp Posted July 20, 2007 Report Share Posted July 20, 2007 QUOTE(ptit bras @ Jul 19 2007, 02:56 PM) Hi,One question Ton, in your XControl, the drop target is a "path" control/indicator or a sting like in Truncate Path Xcontrol ? Ptit bras It's an invisible path on top of the other elements. Ton Quote Link to comment
Olivier Jourdan Posted July 20, 2007 Author Report Share Posted July 20, 2007 CITATION(tcplomp @ Jul 19 2007, 03:29 PM) It's an invisible path on top of the other elements.Ton Invisble 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) Quote Link to comment
Ton Plomp Posted July 20, 2007 Report Share Posted July 20, 2007 QUOTE(ptit bras @ Jul 19 2007, 03:53 PM) Invisble 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 Quote Link to comment
Olivier Jourdan Posted July 20, 2007 Author Report Share Posted July 20, 2007 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 Quote Link to comment
Ton Plomp Posted July 20, 2007 Report Share Posted July 20, 2007 QUOTE(ptit bras @ Jul 19 2007, 05:15 PM) 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 Well there is a second way: http://forums.lavag.org/index.php?act=attach&type=post&id=6404''>http://forums.lavag.org/index.php?act=attach&type=post&id=6404'>http://forums.lavag.org/index.php?act=attach&type=post&id=6404 Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.