Jump to content

How to get buttons to work properly in Clusters


Recommended Posts

I've learned that the best way to make sure non-latching buttons return to its original state when using the event structure is to put the icon of that control in its event case (on the block diagram). How would you handle this if all your controls are in 1 cluster? In this case, there are still many different events occuring but none of the controls are on the block diagram since they're in the cluster control. Currently, I'm using the property node of the control to reset the value back to its original state....is this the best way?

Regis

Link to comment
  • 3 weeks later...
I've learned that the best way to make sure non-latching buttons return to its original state when using the event structure is to put the icon of that control in its event case (on the block diagram).  How would you handle this if all your controls are in 1 cluster?  In this case,  there are still many different events occuring but none of the controls are on the block diagram since they're in the cluster control.  Currently,  I'm using the property node of the control to reset the value back to its original state....is this the best way?

Regis

4123[/snapback]

Regis,

There a few ways to do this and depending on the code some work better than others. You can register events for controls that are in a cluster the same way as any other control as long in the events you do not include the over all control as one of the objects event to be handled. so the object that you are looking for an event would be [mycluster.controlname, value change] or something like that.

The alternative and slightly more painful method is to just register the event for the cluster. Then using the refnum for the cluster and a property node take the controls array, which is an array of refnums for the all of the objects. Then you can poll the objects to see which one has had a value change. I have an example or two lying around if you are not following my explanation.

DAK

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.