• 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. Custom IC SKILL
  3. Block execution in SKILL file while a form is on the sc...

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 144
  • Views 18651
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Block execution in SKILL file while a form is on the screen

HTC060
HTC060 over 11 years ago

Dear SKILL experts

I tried to write a SKILL function that shows a form created by hiCreateAppForm() on the screen and blocks execution until the form is removed from the screen by the user with a OK or Cancel.

In the form I have a listBoxField. The user selects ONE item in the listBox. When OK is pressed the SKILL function that showed the form returns the selected item, when Cancel was selected the function returns nil.

I tried the argument: ?dialogStyle 'modal but the form does not block the execution.

The code is in one SKILL file that I load but the execution of the SKILL statements in the file is not blocked while the form is on the screen.

Here is the code:

file listBox.il:


      ; Create the application form
      hiCreateAppForm(

        ?name 'VARselectListForm
        ?formTitle "Title"
        ?dialogStyle 'modal
        ?initialSize t
        ?buttonLayout 'OKCancel
        ?fields list(
          list(

            hiCreateListBoxField(
                ?name 'VARselectListFormListBox
                ?choices nil
                ?value nil
                ?prompt "Nodes"
            ) ; hiCreateListBoxField

            list(0 0)
            list(150 400)
            50
          ) ; list
        ) ; list

      ) ; hiCreateAppForm

 procedure(SHOWselectListBoxForm(title choices)

    when(and(boundp('VARselectListForm)
             hiIsForm(VARselectListForm))

        VARselectListForm->title = title
        VARselectListForm->VARselectListFormListBox->choices=choices

        hiDisplayForm(VARselectListForm)

        VARselectListForm->VARselectListFormListBox->value

    ) ; when

) ; SHOWselectListBoxForm

And the the file that uses this:

load("listBox.il")

choices = '("aaa" "bbb" "ccc" "ddd" "eee")
title   = "Form title"

printf("Before the box\n")
choice = SHOWselectListBoxForm(title choices)

printf("After the box: %L\n" choice) 

The message After the box............. already appears while the form is on the screen.
I want a blocking solution. The dialog style systemModal is gone.

 Of course I can make a wait loop with global variables, but is there a better way?

Hans Kok

 

 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Giuseppe,

    Unfortunately dialog boxes are not forms, so hiFormList() doesn't work. There doesn't appear to be an equivalent for dialog boxes.

    I just wrote something that finds the symbol for any dialog boxes which match a pattern. Because this relies on some internal information that I don't want to make public in the forums, it's password encrypted. You can use it however:

    load("abFindMatchingDBox.ile" "dbox")

    If all your dialog boxes are generated with gensym('myBox) then you could use:

      abFindMatchingDBox("^myBox")  ; pass a regular expression.

    Note that any dialog boxes which have been closed won't show up - because the variables get set back to nil. So you could then close them by doing:

      foreach(dbox  abFindMatchingDBox("^myBox") hiDBoxOK(symeval(dbox)))

    or similar.

    Hope that helps!

    Andrew.

    abFindMatchingBBox.tar.gz
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Giuseppe,

    Unfortunately dialog boxes are not forms, so hiFormList() doesn't work. There doesn't appear to be an equivalent for dialog boxes.

    I just wrote something that finds the symbol for any dialog boxes which match a pattern. Because this relies on some internal information that I don't want to make public in the forums, it's password encrypted. You can use it however:

    load("abFindMatchingDBox.ile" "dbox")

    If all your dialog boxes are generated with gensym('myBox) then you could use:

      abFindMatchingDBox("^myBox")  ; pass a regular expression.

    Note that any dialog boxes which have been closed won't show up - because the variables get set back to nil. So you could then close them by doing:

      foreach(dbox  abFindMatchingDBox("^myBox") hiDBoxOK(symeval(dbox)))

    or similar.

    Hope that helps!

    Andrew.

    abFindMatchingBBox.tar.gz
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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