• 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. Forms Description

Stats

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

Forms Description

frogconsultant
frogconsultant over 13 years ago

 Hi All,

I am using the samples for the Cadence online document from Product version 31.09 of  November 2009. The sample I am referencing on this post is the one on page 642/643. While I am using as it is i.e.:

;;; creating the File Name field
trFileNameField = hiCreateStringField(
    ?name 'trFileNameField
    ?prompt "File Name"
    ?defValue ".cshrc"
    ?callback "trDoFieldCheckCB( hiGetCurrentForm() )"
    ?editable t
    )
   
;;; checking if the file exists
procedure( trDoFieldCheckCB( theForm )
    if( isFile( theForm->trFileNameField->value )
        then
            println("File exists")
            t
        else
            println("File Does Not Exist--Try Again")
            nil
        ) ;if
) ; procedure

;;; creating the form
trFileForm = hiCreateAppForm(
    ?name ?trFileForm
    ?formTitle "File Form"
    ?callback ?trFileFormCB
    ?fields list( trFileNameField )
    ?unmapAfterCB t
    )
   
procedure( trFileFormCB( theForm )
    if( trDoFieldCheckCB( theForm )
        then
            hiSetCallbackStatus( theForm t )
            hiHighlightField( theForm 'trFileNameField 'background )
            view( theForm->trFileNameField->value )
        else
            hiSetCallbackStatus( theForm nil )
            hiHighlightField( theForm 'trFileNameField 'highlight )
        ) ; if
) ; procedure

;;; displaying the form
hiDisplayForm( 'trFileForm )

 

I got 

*Error* hiFormDone: argument #1 should be a defstruct (type template = "r") - ?trFileForm

when I click with the mouse on the Ok button and almost identical messages on anywhere else on the form.

Am I missing something obvious to use this simple skill or should I call the form differently as specified in Cadence document?

Thanks a lot for your help,

Fabian

  • Cancel
  • skillUser
    skillUser over 13 years ago

    Bonjour Fabian,

    I can see two "typos":

    ?name ?trFileForm

    Should be:

    ?name 'trFileForm

    And:

    ?callback ?trFileFormCB

    Should be:

    ?callback 'trFileFormCB

    However, I have not tried any of this code, this is just by inspection...

    Hopefully this will help!

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frogconsultant
    frogconsultant over 13 years ago

    Thanks Lawrence to see the typos. It solved completly the issue.

    It is unfortunate that Cadence samples could not be skill bug free :-)

    Cheers, Fabian

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Fabian,

    I looked in the PDF you mention (skuiref.pdf) and it does have 'trFileForm and 'trFileFormCB . So they are correct. The trouble is that sometimes when you copy and paste such code into an editor, the fact that there are numerous different quote characters can mean that they get translated into an unknown character (?) by the editor you're using. Looking at the document, you'll see a little further up in the definition for trFileNameField a single quote is used - and it's slightly different from the single quote on the hiCreateAppForm() call. So I think that's the likely cause.

    Regards,

    Andrew.

    • 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