Jump to content

Register Event Callback - VI type


Recommended Posts

Event Callback VIs are a great way to handle events.

Registering them is quite simple, if you have a callback VI of the correct type. This type depends on the event you want to capture.

There is a very easy way to get a VI refnum of the correct type: just click "create constant" on the VI Ref input.

But this doesn't give you the VI, it only gives you the correct type of reference.

Is there any simple way to get a VI of the correct type, if you have this reference?

post-7932-127427131269_thumb.png

I know one way, but it's quite awkward:

Connect this constant to a Call By Reference Node. Now you've got all the inputs and outputs to create controls and inidicators of the correct type. Once you've got those, connect them to the appropriate connectors (don't forget to select the correct pattern) and make shure they are recommended. Now you can delete everything but the controls and indicators and start coding.

post-7932-127427138415_thumb.png

There must be an easier way to achieve this!

What am I missing?

Edit: Sorry for the huge pictures. I have no idea what happened to scale them in that strange way...

Edited by silmaril
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.