Home > Community > Forums > PCB SKILL > Force a callback when a form is canceled?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Force a callback when a form is canceled? 

Last post Fri, Jan 3 2014 12:39 PM by mikebystedt. 3 replies.
Started by mikebystedt 03 Jan 2014 11:06 AM. Topic has 3 replies and 4468 views
Page 1 of 1 (4 items)
Sort Posts:
  • Fri, Jan 3 2014 11:06 AM

    Force a callback when a form is canceled? Reply

    I've got a close button on my form, but is there a way to force a similar callback to be invoked
    when the upper right "X" button is clicked?  I'd like to make sure that I do some highlight cleanups
    when my form gets closed reguardless of how the user dismisses the form.

    Thanks, -Mike 

    • Post Points: 35
  • Fri, Jan 3 2014 11:35 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 707
    • Points 15,395
    Re: Force a callback when a form is canceled? Reply
    You need to name your close button correctly. From memory it should be "cancel" but it may be "quit".
    Dave Elder, Tait Communications
    • Post Points: 5
  • Fri, Jan 3 2014 11:47 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 290
    • Points 4,620
    Re: Force a callback when a form is canceled? Reply

    Even if you don't label the buttons in a standard manner you can check the doneState attribute. When the menu bar 'X' is selected the doneState should have a value of 3. See the example code, axlform.il in <cdsroot>/share/pcb/examples/skill/form/basic

    • Post Points: 20
  • Fri, Jan 3 2014 12:39 PM

    Re: Force a callback when a form is canceled? Reply

    This was perfect.  Worked like a charm. Thank you both for pointing me in the right direction on this!

    Very much appreciated!

    -Mike 

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by mikebystedt at 03 Jan 2014 11:06 AM. Topic has 3 replies.