• 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. why the datatype changed after form instanced ?

Stats

  • Replies 2
  • Subscribers 148
  • Views 926
  • Members are here 0

why the datatype changed after form instanced ?

JamesJames
JamesJames 2 months ago

procedure(form1()   ; let((bt1)   let(()     strField = hiCreateStringField(       ?name 'strField       ?defValue ""     )     bt1 = hiCreateButton(       ?name 'bt1       ?buttonText "bt1"       ?callback "printf(\"the value of str: %L\n\" strField~>value)"     )     form1 = hiCreateLayoutForm(       'formn1       "Form1"       hiCreateVerticalBoxLayout(         'form1Vbox         ?items list(           strField           list(bt1)         )       )           )     aa = form1~>bt1     hiDisplayForm(form1)     bb= form1~>bt1   ) )

type(aa) == type(bb)

I'm curios that why the data type changed after form instanced ?

backgroud:  we update the widgets of form must through  hierachty level like :   form~>fieldSymbol~>value  = "value1", here, you can update data through bb but not aa becase that aa is a string filed, bb is a symbol 

  • Cancel
  • Sign in to reply
Parents
  • JamesJames
    JamesJames 2 months ago
    Code formatted as following: 
    procedure(form1()
      ; let((bt1)
      let(()
        strField = hiCreateStringField(
          ?name 'strField
          ?defValue ""
        )
        bt1 = hiCreateButton(
          ?name 'bt1
          ?buttonText "bt1"
          ?callback "printf(\"the value of str: %L\n\" strField~>value)"
        )
        form1 = hiCreateLayoutForm(
          'formn1
          "Form1"
          hiCreateVerticalBoxLayout(
            'form1Vbox
            ?items list(
              strField
              list(bt1)
            )
          )
         
        )
        aa = form1~>bt1
        hiDisplayForm(form1)
        bb= form1~>bt1
      )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • JamesJames
    JamesJames 2 months ago
    Code formatted as following: 
    procedure(form1()
      ; let((bt1)
      let(()
        strField = hiCreateStringField(
          ?name 'strField
          ?defValue ""
        )
        bt1 = hiCreateButton(
          ?name 'bt1
          ?buttonText "bt1"
          ?callback "printf(\"the value of str: %L\n\" strField~>value)"
        )
        form1 = hiCreateLayoutForm(
          'formn1
          "Form1"
          hiCreateVerticalBoxLayout(
            'form1Vbox
            ?items list(
              strField
              list(bt1)
            )
          )
         
        )
        aa = form1~>bt1
        hiDisplayForm(form1)
        bb= form1~>bt1
      )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett 2 months ago in reply to JamesJames

    This is because the field data structures are kind of placeholders until the form is instantiated (hiInstantiateForm does this, but hiDisplayForm does it first too). Then it replaces them with the real structures linked to the UI elements. Keeping a reference to a form field shouldn't be done before it's instantiated - if you need to do this before it's displayed, call hiInstantiateForm(form1) first.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information