Michael Aivaliotis Posted June 19, 2003 Report Share Posted June 19, 2003 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? Quote Link to comment
Jim Kring Posted June 19, 2003 Report Share Posted June 19, 2003 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 Quote Link to comment
Michael Aivaliotis Posted June 19, 2003 Author Report Share Posted June 19, 2003 Quote Link to comment
Jon Sweeney Posted August 13, 2003 Report Share Posted August 13, 2003 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) . 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.