• 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. problems about create form

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 13909
  • 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

problems about create form

nidon2003
nidon2003 over 10 years ago

Hi everyone,

I write a script to create forms as follow:

####################################################

procedure(testCallback(name)
let(()

fieldName=concat(name)
testStringField=hiCreateLabel(
?name fieldName
?labelText strcat("This is test form from " name) )

filedForm = hiCreateAppForm(
?name fieldName
?formTitle "test"
?buttonLayout 'OKCancel
?fields
list(
list(testStringField 0:20 200:40)
)
)

hiDisplayForm(filedForm 650:250)

)
)

procedure(FormTest()
let(()

itemList=nil
hButton=40
yButton=20
for(i 1 10
itemName=concat("test" sprintf(nil "%n" i))
itemText=strcat("test" sprintf(nil "%n" i))
itemCallback=sprintf(nil "testCallback(%L)" itemText)
item=list(
hiCreateFormButton(
?name itemName
?buttonText itemText
?callback itemCallback)
0:yButton+40*(i-1)
410:hButton )
itemList=cons(item itemList)
)

FormTest = hiCreateAppForm(
?name 'FormTest
?formTitle "Form Test"
?buttonLayout 'OKCancel
?fields itemList )

) ;let
) ;

FormTest()
hiDisplayForm(FormTest 350:250)

####################################################

But  it shows two warnings when i run it,

Warning hiDeleteForm: Cannot delete a form that is mapped or form within the form's callback

Warning hiCreateForm: Could not delete already created form.

I can't to solve these warnings, please give me some help.

Thank you very much!

 

  • Cancel
Parents
  • nidon2003
    nidon2003 over 10 years ago

    Thanks for you reply,  Andrew and Lawrence

       As you said above, i found the problem in my code and got a way to solve it. In the new code, if the test form has been created, it will not be recreated again. The whole code as follow:

    ####################################################

    procedure(testCallback(name)
    let((fieldName testStringField filedForm )

    fieldName=concat(name)
    testStringField=hiCreateLabel(
    ?name fieldName
    ?labelText strcat("This is test form from " name) )

    filedForm = hiCreateAppForm(
    ?name fieldName
    ?formTitle "test"
    ?buttonLayout 'OKCancel
    ?fields
    list(
    list(testStringField 0:20 200:40)
    )
    )

    ;; hiDisplayForm(filedForm 650:250)

    )
    )

    procedure(test1(name)
    let((fieldName)

    fieldName=concat(name)
    unless(boundp(fieldName) testCallback(name) )

    hiDisplayForm(filedForm 650:250)

    )
    )

    procedure(FormTest()
    let((itemList hButton yButton itemName itemText itemCallback item)

    itemList=nil
    hButton=40
    yButton=20
    for(i 1 10
    itemName=concat("test" sprintf(nil "%n" i))
    itemText=strcat("test" sprintf(nil "%n" i))
    itemCallback=sprintf(nil "test1(%L)" itemText)
    item=list(
    hiCreateFormButton(
    ?name itemName
    ?buttonText itemText
    ?callback itemCallback)
    0:yButton+40*(i-1)
    410:hButton )
    itemList=cons(item itemList)
    )

    FormTest = hiCreateAppForm(
    ?name 'FormTest
    ?formTitle "Form Test"
    ?buttonLayout 'OKCancel
    ?fields itemList )

    ) ;let
    ) ;

    FormTest()
    hiDisplayForm(FormTest 350:250)

    ####################################################

    Thank you very much!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • nidon2003
    nidon2003 over 10 years ago

    Thanks for you reply,  Andrew and Lawrence

       As you said above, i found the problem in my code and got a way to solve it. In the new code, if the test form has been created, it will not be recreated again. The whole code as follow:

    ####################################################

    procedure(testCallback(name)
    let((fieldName testStringField filedForm )

    fieldName=concat(name)
    testStringField=hiCreateLabel(
    ?name fieldName
    ?labelText strcat("This is test form from " name) )

    filedForm = hiCreateAppForm(
    ?name fieldName
    ?formTitle "test"
    ?buttonLayout 'OKCancel
    ?fields
    list(
    list(testStringField 0:20 200:40)
    )
    )

    ;; hiDisplayForm(filedForm 650:250)

    )
    )

    procedure(test1(name)
    let((fieldName)

    fieldName=concat(name)
    unless(boundp(fieldName) testCallback(name) )

    hiDisplayForm(filedForm 650:250)

    )
    )

    procedure(FormTest()
    let((itemList hButton yButton itemName itemText itemCallback item)

    itemList=nil
    hButton=40
    yButton=20
    for(i 1 10
    itemName=concat("test" sprintf(nil "%n" i))
    itemText=strcat("test" sprintf(nil "%n" i))
    itemCallback=sprintf(nil "test1(%L)" itemText)
    item=list(
    hiCreateFormButton(
    ?name itemName
    ?buttonText itemText
    ?callback itemCallback)
    0:yButton+40*(i-1)
    410:hButton )
    itemList=cons(item itemList)
    )

    FormTest = hiCreateAppForm(
    ?name 'FormTest
    ?formTitle "Form Test"
    ?buttonLayout 'OKCancel
    ?fields itemList )

    ) ;let
    ) ;

    FormTest()
    hiDisplayForm(FormTest 350:250)

    ####################################################

    Thank you very much!

    • 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