• 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. Refresh/update/re-create form problem

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 2960
  • 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

Refresh/update/re-create form problem

KokoLiu
KokoLiu over 9 years ago

Hi,

I am planning to create a form that I would able to either refresh or update the new time I call it or it will able to remove the form and create again. I research for awhile and I was trying to do hiFormDone to remove and recreate the form. But I got into the following warning. And I am not sure how to remove the form and re-create it. Or is it easier to update the report field? If so then how can I regenerate the report field?

Thank you very much.

*WARNING* hiDeleteForm: Cannot delete a form that is mapped or from within the form's callback (WindowForm)
*WARNING* hiCreateAppForm: Could not delete already created form WindowForm

procedure(clWindowForm()
let((windowField)
if(hiIsFormDisplayed(WindowForm) then
hiFormDone(WindowForm)
)

windowField = hiCreateReportField(
?name 'window
?selectMode 'single
?headers '(("Library" 120 'left 'string t)
("cell" 300 'left 'string t)
("view" 120 'left 'string t)
("" 0 'left))
?choices clwindowList()
?sort '(2 nil)
)
WindowForm = hiCreateAppForm(
?name 'WindowForm
?formTitle "Windows"
?fields list(
list(windowField 0:0 600:500 300)
)
?buttonLayout '(OKCancel (Left "clWindowResize(\"L\")") (Right "clWindowResize(\"R\")") (Close "clWindowResize(\"Close\")"))
)

hiDisplayForm(WindowForm)
)
)

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    The problem is that the form doesn't get unmapped immediately, and so it's still mapped whilst the form is being recreated. One way around this is to use hiEnqueueCmd(). I also put an extra check that the form variable is bound so that it works the first time around:

    procedure(clCreateAndDisplayForm()
      let((windowField)
        windowField = hiCreateReportField(
          ?name 'window
          ?selectMode 'single
          ?headers '(("Library" 120 'left 'string t)
            ("cell" 300 'left 'string t)
            ("view" 120 'left 'string t)
            ("" 0 'left))
          ?choices clwindowList()
          ?sort '(2 nil)
        )
        WindowForm = hiCreateAppForm(
          ?name 'WindowForm
          ?formTitle "Windows"
          ?fields list(
            list(windowField 0:0 600:500 300)
            )
          ?buttonLayout '(OKCancel (Left "clWindowResize(\"L\")") (Right "clWindowResize(\"R\")") (Close "clWindowResize(\"Close\")"))
        )
    
        hiDisplayForm(WindowForm)
      )
    )
    procedure(clWindowForm()
      if(boundp('WindowForm) && hiIsFormDisplayed(WindowForm) then
        hiFormDone(WindowForm)
      )
      hiEnqueueCmd("clCreateAndDisplayForm()")
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KokoLiu
    KokoLiu over 9 years ago

    Hi Andrew,

    Thank you very much. That works.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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