Jump to content

Different event cases for same control - possible?


Recommended Posts

With dynamic events, I was wondering if there was a way to have controls with multiple functions. A good example would be a START button that would change into a STOP button. It would be great to have one event case per funtion and determine dynamically which case will execute for the specified button press. I was thinking that you would have to register the control for each individual function you wanted. Then the question arrises, how do you switch registration over to another event case. Any suggestions?

post-15-1073111546.gif?width=400

blog-2-1154935821.jpg?width=400

blog-2-1154935890.jpg?width=400

blog-2-1154935937.jpg?width=400

blog-2-1154936262.jpg?width=400

blog-2-1154937755.jpg?width=400

Link to comment
With dynamic events, I was wondering if there was a way to have controls with multiple functions. A good example would be a START button that would change into a STOP button. It would be great to have one event case per funtion and determine dynamically which case will execute for the specified button press. I was thinking that you would have to register the control for each individual function you wanted. Then the question arrises, how do you switch registration over to another event case. Any suggestions?

Here is an example that does this. However, it appears that there is a LabVIEW bug that is causing problems with the reregistration. :?

Download File:post-15-1073111573.vi

blog-123-1155096857.jpg?width=400

Link to comment
  • 1 month later...

Since my previous post, I have belatedly read the documentation for "Modifying Registration Dynamically" and have a better understanding of what you were trying to do with the "Not a Reference"s (ie, using them to unregister events) :oops: . My modified interpretation of why the vi hangs follows:

Assuming the event registration structure is interpretted top-down like a property node is, in one eventcase (the 1st one encountered) you are unregistering and then registering the value-change event (net result=the event is registered). In the second eventcase (which causes the vi to hang) you are registering the event and then unregistering it (net result=the event is unregistered).

If this interpretation is correct, I'm not sure if you can call the behavior a bug or expected-but-unwanted.

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.