Jump to content

Dynamic event registration only for specified controls


Recommended Posts

http://forums.lavag.org/index.php?act=attach&type=post&id=5558http://forums.lavag.org/index.php?act=attach&type=post&id=5557

I started with the Dynamically Register for Events example VI and modified it to test some things I want to try (see attached VI). What I want to do is dynamically register mouse down events for the cluster of controls that the mouse is currently in. Once I have that then I can get the control references for that cluster so I can color label text of the selected control. It seems that I have to Register for Events (I hate the syntax of that, why can't it just be Register Events?) for the whole panel like the original example.

If I try to register only the controls of interest (Trim registers and Capacitor control registers in my case) it won't let me do it (see the second VI test control colors_errors). why can't I register the Mouse Down event when the Mouse Enter event occurs for a control? Also the error that pops up when I hover on the broken wire doesn't make sense. It says

refunm conflict:cannot connect different refum types

The type of source is Event Registration Refnum

The type of sink is Event Registration Refnum

Uh, how are the source and sink different?

George

Link to comment

The event Refnum is strictly typed, meaning that the data in the event is very precise (just like a queue), including the control type and event type, and you have the old type in the shift register, which doesn't update good in such cases.

It is better to have it initialized outisde the while loop:

http://forums.lavag.org/index.php?act=attach&type=post&id=5560

Ton

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.