• 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. hiAddFields: invalid field description in fieldList

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 5359
  • 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

hiAddFields: invalid field description in fieldList

mythverdic
mythverdic over 1 year ago

I am trying add two string fieds horizontally in a form: 

hiAddFields(

form

list(

list(hiCreateStringField(

?name 'test1

?prompt "test1") 0:0 30:40)

list(hiCreateStringField(

?name 'test2

?prompt "test2") 60:0 30:40)

)

)

where variable "form" has already created by hiCreateAppForm() method, but code above encountered warnings: 

*WARNING* hiAddFields: invalid field description in fieldList

*WARNING* Field adding ABANDONED

However, code below works fine if I delete the two-dimensional information:

hiAddFields(

form

list(

hiCreateStringField(

?name 'test1

?prompt "test1")

hiCreateStringField(

?name 'test2

?prompt "test2")

)

)

I have read SKILL reference, and it actually advises listFields could be as below:

list(

list( r_field1 l_XYlocation l_widthHeight [x_promptBoxWidthOrHeight])
list( r_field2 l_XYlocation l_widthHeight [x_promptBoxWidthOrHeight])
list( r_field3 l_XYlocation l_widthHeight [x_promptBoxWidthOrHeight])
list( r_field4 l_XYlocation l_widthHeight [x_promptBoxWidthOrHeight])

)

Please tell me what I got wrong! Thanks in advance!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    I don't get that error, but the issue is that you need to have specified the prompt width for these fields because they have prompts. It works for me... (although the fields are not going to be wide enough with the dimensions you gave).

    Far easier is to use layout forms rather than old "app" forms using coordinates, but if you are going to do that you have to provide sufficient information.

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mythverdic
    mythverdic over 1 year ago in reply to Andrew Beckett

    Thanks for your reply,Andrew.

    Below is the code that would arise warnings:

    ;;myformtest.il

    include "listDev.il"

    ; Create string entry for the form.

    procedure( myformDefineFields()

    ; Create a button for the form.

    listbutton = hiCreateButton(

    ?name boolfldglb

    ?buttonText "list device"

    ?callback "listdev_cb(myformglb)"

    )

    list( listbutton )

    )

    ;Generate the form

    procedure( myformcreateform()

    if( !boundp('myformglb)|| (myformglb == nil)

    then

    myformglb = hiCreateAppForm(

    ?name'myformglb

    ?fields myformDefineFields()

    ?formTitle "My Form"

    ?buttonLayout'OKCancel

    )

    myformglb

    )

    ;Display the form

    procedure(myformdisplayform()

    myformcreateform() ;;; Creation and Display are separate

    hiDisplayForm(myformglb)

    )

    ------------------------------------------

    The listDev.il is as below:

    ;;listDev.il

    procedure( listdev_cb(form)

    ;delete additional old fields

    hiDeleteFields(form cdr(form->fieldList))

    hiAddFields(

    form

    list(

    list(hiCreateStringField(

    ?name'test1

    ?prompt "test1") 0:0 60:40)

    list(hiCreateStringField(

    ?name'test2

    ?prompt "test2") 0:0 60:40)

    )

    )

    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to mythverdic

    OK, the problem is that your main form has NOT been created as a 2D form (there were no coordinates in the initial field placement). So it's a 1D form - you cannot then add fields with coordinates to such a form (you can add fields, but they always will appear at the bottom. Secondly, the 2D descriptors for the string fields are incorrect (as I said before) because they are missing the prompt width (which is required since the field has a prompt). Thirdly, the coordinates in the example above would mean that the fields are on top of each other. Fourthly various things have gone wrong when pasting the code (missing spaces, missing quotation marks, missing parentheses). 

    Anyway, here's fixed versions of the two files which will behave:

    ;;myformtest.il
    include "listDev.il"
    
    ; Create string entry for the form.
    procedure( myformDefineFields()
      ; Create a button for the form.
      listbutton = hiCreateButton(
        ?name 'boolfldglb
        ?buttonText "list device"
        ?callback "listdev_cb(myformglb)"
      )
      list( list(listbutton 0:0 200:30))
    )
    
    ;Generate the form
    procedure( myformcreateform()
      if( !boundp('myformglb)|| (myformglb == nil)
        then
          myformglb = hiCreateAppForm(
    	?name 'myformglb
    	?fields myformDefineFields()
    	?formTitle "My Form"
    	?buttonLayout 'OKCancel
          )
        myformglb
      )
    )
    
    ;Display the form
    procedure(myformdisplayform()
      myformcreateform() ;;; Creation and Display are separate
      hiDisplayForm(myformglb)
    )

    listDev.il:

    procedure( listdev_cb(form)
      ;delete additional old fields
      hiDeleteFields(form cdr(form->fieldList))
      hiAddFields(
        form
        list(
          list(hiCreateStringField(
    	?name 'test1
    	?prompt "test1") 0:30 200:30 80)
          list(hiCreateStringField(
    	?name 'test2
    	?prompt "test2") 0:60 200:30 80)
        )
      )
    )

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mythverdic
    mythverdic over 1 year ago in reply to Andrew Beckett

    Thanks a lot for your patience sorry for my so  many mistakes. It really saves me a lot of debug time.

    By the way, do you have any suggestion on which document should I

    go for if I encounter  other warnings or errors. So far, my only

    reference is the built-in SKILL reference in cadence.

    • 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