04-21-2008 05:27 AM
Hello,
Maybe I am missing something but the Data Change event of a XControl is not called when the XControl is used in a Type Def. or Strictly Type Def. (see the attached file).
There may be some logics behind it but it eludes me. Any idea of why or any idea of a workaround still keeping the Type Def. ?
Best Regards.
Julian
Windows XP SP2 & Windows Vista 64 - LV 8.5 & LV 8.5.1
04-21-2008 03:15 PM
04-21-2008 03:42 PM
04-21-2008 05:50 PM
Hi TWGomez,
Thank you for addressing this issue. It must be a XControl because it carries many implemented functions/methods (though there is none in the provided example).
Also consider that the provided non-working example is in fact a reduction of my actual problem (in a 1000-VI large application) to the smallest relevant elements. In fact I use a typedef of a mix of a lot of different XControls and normal controls, some of them being typedef, strictly typedef or normal controls and other XControls of XControls (of XControls...) in a object oriented like approach...
Hi Prashant,
I use a typedef to propagate its modifications automatically everywhere it is used in the application (a lot of places). As you imply a XControl would do the same, though one would like to construct a simple typedef when no additional functionality is wanted.
The remark "XControl=typedef+block diagram" is actually very neat (never thought of it that way) because it provides a workaround by transforming every typedef into a XControl. Thanks very much, I will explore this solution.
One issue remains: All normal controls update their displayed value when inserted into a typedef but not XControls. Data change event is not triggered. I known that XControls have some limitations (no array of XControls) but I would say, like TWGomez, that this is a “bug” considering the expected functionality.
04-21-2008 06:11 PM
05-05-2008 10:00 AM
05-06-2008 03:18 PM
Hi Matthieu,
Indeed your link is about the Data Change event of XControls. What I find interesting is that your link is about situations in which the Data change event is unexpectedly triggered twice whereas this thread is about the Data change event not being triggered at all, not even once. 🙂
Thank you for this interesting link. Julian3.
05-09-2008 03:03 AM
An XControl is not exactly "a typedef with with a block diagram". A Typedef supports the property "Callers' Names" (thought the help says it does not). An XControl does not have this property because it is a kind of a library.
The data changed event for XControls inside of a typedef is called in LabVIEW 8.2 but not in 8.5. Therefore I must replace the typedefs by the containing XControl. Some optimizing will not work thereafter. But the function is more imortant of course.
I would prefer to search my own bugs instead of those from LabVIEW...
Greetings,
shb