Storing a form as a property of a disembodied list

Discussion in 'Cadence' started by suresh j, Dec 18, 2003.

  1. suresh j

    suresh j Guest

    Hi all,
    In a normal case where I will store the form as a global varible, I do,
    myForm = hiCreateAppForm(
    ?name 'myForm
    ...
    )

    But what should I pass to the ?name parameter if I want to store the
    form as a property of a disembodied list.
    myList = list(nil)
    myList->form = hiCreateAppForm(
    ?name WhatShouldComeHere
    ...
    )

    Thanks.

    regards,
    Suresh J
     
    suresh j, Dec 18, 2003
    #1
  2. Suresh,

    You can't. It has to be a global variable.

    The reason for this is that it must be available in the global scope, because
    updates to the form need to be described in such a way that they can be output
    into the CDS.log file for subsequent replay (if you desired), and also the form
    would not know the scope to update local variables (say).

    So you can store the return value of hiCreateAppForm into a dpl like you've
    done in the second example, but the ?name argument would still have to be
    a global variable. The form structure would then be stored in both the DPL
    and the global variable - but because it is a reference, any changes to the form
    structure would be visible from either the DPL or the global variable.

    Regards,

    Andrew.
     
    Andrew Beckett, Dec 18, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.