LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
manu.NET

Custom events for XControls ...

Status: Declined

National Instruments will not be implementing this idea. NI has no further plans to invest significantly in XControl technology.

It should be nice to be abble to add Custom events to Xcontrol ...

 

I know that it is already possible ... but in a not user friendly way !

 

I would like to be abble to add a custom event like adding a new property or a new method.

And this "Xcontrol user event" could be seen automaticaly in the "Add new event" of an event structure, when an instance of this XControl has been drop on a front panel.

 

So what i would like is ...

 

  • Adding a custom event to a Xcontrol, as a property
  • That this Event appears automatically in the event structure configurator. (Like events of standards controls and indicators)

 

My need is to add custom event different from "Value changed", in order to build powerfull XControl. 

And be abble to use these events without having to regiter them manually. (But like standards controls and indicators)

 

Manu.net
11 Comments
TCPlomp
Trusted Enthusiast

Whenever a property or method is run the 'Display State Change' event is triggered.

With a messaging string inside the  state ability you can get the behaviour you want.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
manu.NET
Active Participant

My need is to create my own event, a specific event with strong typed datas !

I don't want to wait the event "Display state change" if my event has nothing to do with "Display State". 

( It's a question of philosphy )

 

 

Be carefull, the aim of my question is not "how to do Xcontrol Custom event with existing Labview" ...

My question is more about ... how to bring Labview a little more powerfull ...

 

I come from DotNet (in a previous live ) and i had a tool named 'UserControl' ...

 

A userControl...

 

-> Is An Object with a visual behaviour

-> has properties and methods

-> has events

-> Has particular behaviour

 

=> I think that Labview XControl is like a DotNet UserControl ... but with less possibilities !

 

XControl should be the way to build custom controls and indicators with behaviour .... And custom behaviour means also cutom events ... How fun dragging an XControl on a front panel, and be able to view the

corresponding custom events (with structured strong typed content) listed in the "Add new event" treeView ...

 

Trying to insert my custom event in the  "Display state change event" is a way to solve my problem ...

But is not the good way , according to me !

 

I am for strong typed objects ... generic flatten is for me too dangerous ... because you have to know exactly what you are waiting for (when you try to unflatten ) ...

And if you have to give your generic, "flatten string based" code to someone else !!! Aie !!!

 

Thanks for your remark ...

I had already the same type of discussion with my collegues ...

and for the moment, the discussion is still open ! 

 

 

 

 

Manu.net
Intaris
Proven Zealot

I agree wholeheartily.

 

There a lot of things which need to be "fixed" regarding XControls.  This is certianly one of them.

JackDunaway
Trusted Enthusiast

Ton... also, it looks like manuLerch is asking for the event to be handled by an event structure in the parent VI of the XControl, not by the event structure inside the Facade VI of the XControl (where the Display State Change event is handled).

 

This is an intriguing idea that would have provided a more elegant solution to one of my recent challenges. I wanted an XControl that would fire different events, depending upon how the user interacted with the control. (Simplified, if user presses button A in XControl, event A is fired, user presses button B, B event is fired, etc...)

TCPlomp
Trusted Enthusiast

How I read it, this request is for adding an event to the facade event queue.

However an triggering an event in the owning VI is requested in this idea.

 

(I don't fully reject this idea, but I think the current situation is OK (for now).

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
EMSS
Member

Hi ,

 

I need the details how to create a X - control. what are the roles of Data, State, Facade, Init, Uninit.

 

 

 

 

manu.NET
Active Participant
Hi EMSS, Here is a little link ... http://zone.ni.com/devzone/cda/tut/p/id/3198 Manu.net
Manu.net
Pie56694
Active Participant

TCPlomp, is there a way you're aware of, in the existing framework, to use property or method nodes in VIs that don't contain a copy of the XControl?  I have a requirement for a one-to-many pipe.  The one is a background process that's publishing data to the many which are XControls.  I'd love to register for a user event in the facade because I can easily direct the message from the process to the right control instance, but I can't access the XControl's properties and methods from the process because it doesn't contain a copy of the XControl.  Even when I pass the XCtl Refnum to the process, I get the generic Ctl modifiers.  I can't type cast the refnum because the .xctl file is not a valid type descriptor.  I'm left with writing the Value property of the XCtl Refnum, but I'd like messaging capability.  Any ideas?

Darren
Proven Zealot
Status changed to: Declined

National Instruments will not be implementing this idea. NI has no further plans to invest significantly in XControl technology.

ConnerP
Member

Hi Darren,

If XControls are not expecting further development, is there an expected alternative that will serve as a new means of control customization?