• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. blocking of Forms

Stats

  • Replies 5
  • Subscribers 159
  • Views 13634
  • Members are here 0
More Content

blocking of Forms

SkilSiao
SkilSiao over 13 years ago

Hi, I want to create a form (my_form) that after it is displayed, the background functions or other opened forms cannot be activated again until this form (my_form) is closed. (Just like PackStack Editor, once it is opened, the rest of the functions are only available again when PackStack Editor is CLOSED).

my approach (to create) is like this,

my_form = axlFormCreate((gensym) "my_form.form" '("CENTER" "msglines" 1)  'my_form_Action nil nil)

the my_form comes with an "Ok" button to close the form and another action button for some updating tasks, and that is why i need a Callback function 'my_form_Action. The g_nonBlock i leave it as nil as per the description of the function, but this doesnt not seem working... Things are still able to be run with the my_form opened.

How shall go around with this? is there a way to pause everything first until my_form is closed? Thx in advance.

  • Sign in to reply
  • Cancel
  • fxffxf
    fxffxf over 13 years ago

    see example @ <cdsroot>/share/pcb/examples/skill/form/basic/axlform.il

    In this file look for the procedure blockTest. 

    The key to blocking a window is axlUIWBlock.

    The 'block option to axlFormCreate indicates to the user via a title bar change that the dialog is blocking.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • SkilSiao
    SkilSiao over 13 years ago

    Hi fxffxf, Thank you very much for the help.

    The function  axlUIWBlock(form_handle) works well.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • SkilSiao
    SkilSiao over 13 years ago

    Hi, just an extension from this question. i create a form and display it with axlUIWBlock in the main function:

    temp_form = axlFormCreate((gensym) "form_file1.form" position '_form_file1_action t nil)

    axlFormDisplay(temp_form)   axlUIWBlock(temp_form)

     now in the  _form_file1_action, i want to return a value once the temp_form is closed. (from an "ok" button)

    which is shown below:

    ("done" ... ...

    ; say, i wan to return a varA to the main function.

    axlClearSelSet() axlFinishEnterFun() axlFormClose(temp_form) )

    how shall i achieve this? such that the main function can receive the varA...

    Thx in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fxffxf
    fxffxf over 13 years ago

    For a blocking form you typically don't need to use  axlFinishEnterFun()

    In your callback handler, _form_file1_action, on a done or cancel event assign a user attribute to the form handler. For example do:

        temp_form->MyFormIsDone = <my_value>

    In your main function (after the axlUIWBlock), you will be able to fetch the the value from temp_form->MyFormIsDone and return it.

    When assigning user attributes to the form handler (temp_form), capitalize the first letter to avoid any conflicts with pre-defined Cadence attributes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • SkilSiao
    SkilSiao over 13 years ago

    Hi fxffxf, thanks for the help and advice. Yes, just continue in the main function to capture the form handle attribute can do, because i am thinking that the form handle may have "gone" once it is close, and usually we execute the "action" with the attributes when users are having interaction with the forms.

    thanks again, you have always been very helpful.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information