Jump to content
Developer Wiki and Function Reference Links ×

Hatch Button on OIP


twk

Recommended Posts

How do we pass info from one event to the next?

I wrote a PIO that has standard parameters, plus an extra button that allows the user to select a hatch from a custom pop-up dialog.

I placed the code for calling the hatch dialog into the 'button click' event section, and tested it. It was getting the hatch name correctly (i sent it to static text parameter to display it there).

What I was wanting was to send the name through to the 'resetEvent' section. That has the code to set a rectangle to that selected hatch. Which I can't get it to.

If I'm unclear I can try and post a narrowed down version of my code.

Thanks in advance

Link to comment

A global param is a global param, but you can't just jump from one event through another in one go.

Only the triggered event will run so not all of your code will be used. This means that if you would "draw" the rectangle in your buttonIsClicked event, it would probable be drawn outside your pio, not bound to it.

After changing your paramfield/recordfield with SetRField, a RESET event will be triggered. The complete code of your object will run again ( refreshing any parameter value you had loaded, also the globals ) and excecute the correct event ( reset in this case ).

That is why you need to alter an object parameter and load it to use your selected hatch.

Edited by hippothamus
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...