Using Lists with forms

Guest
All,

Is there a way to "refresh" a list that has changed in a form. For
example, I have (1 2 3 4 5) in a list, I change the list to (1 2 3)
can I "refresh" the form or does the form need to be closed and
brought back up?

Thank you,
Eric
 
Hi Eric,

Have you ever tried to write a callback for it ?

There are couple of useful examples I have bookmarked from previous
posts ...
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/269c7250cd00e970/145fa40796830f7b
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/3ee851743adcb2ec/a51e3303258b2ae3

Riad.
 
Riad KACED wrote, on 04/14/09 23:39:
Hi Eric,

Have you ever tried to write a callback for it ?

There are couple of useful examples I have bookmarked from previous
posts ...
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/269c7250cd00e970/145fa40796830f7b
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/3ee851743adcb2ec/a51e3303258b2ae3

Riad.
Eric,

It's not entirely obvious what you're trying to achieve. Is this list a list of
choices in a cyclic field, or is it a list of entries in a list box? Or is it
some list completely outside the form? What triggers the change?

Sorry, more questions than answers... but callbacks could well be the answer, as
Riad said.

Andrew.
 
eric.d.fitzsimmons@gmail.com wrote, on 04/15/09 14:46:
Riad and Andrew,

I went home last night thinking I did not give enough information to
articulate what I was trying to accomplish, sorry about that. I did
look over the example and learned a few things, but I am still fuzzy
on how I do what I want.

So, from the code below if I hit "apply" a procedure is called and
with that procedure I want to "refresh"(maybe bad wording) the list
box. How do I do that?

Thank you for your help in advance,
Eric
Eric,

You had a parenthesis in the wrong place, which I fixed (after the EFDualMode
variable definition). I think you want something like this:

let((EFDualMode EFSortBy EFNetsBox)

EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "Sort data by?"
?value "Instance"
?defValue "Instance"
?choices list("Instance" "Cellname" "Pin" "Net")
)

EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)

EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeinst()"
?numRows length(EFNet_list)
)

;;; defines the form

hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Nets"
?callback "EFSortExecution()"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)

) ; hiCreateAppForm
)
hiDisplayForm(EFInstanceNetsForm)

procedure(EFSortExecution()
let((currentList)
printf("Procdure to refresh the List Box")
currentList=EFInstanceNetsForm->EFListBoxField->choices
; silly examples of updating the choices
EFInstanceNetsForm->EFListBoxField->choices=reverse(currentList)
;EFInstanceNetsForm->EFListBoxField->choices=cdr(currentList)
)
)


Regards,

Andrew.
 
On Apr 15, 5:42 am, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
Riad KACED wrote, on 04/14/09 23:39:

Hi Eric,

Have you ever tried to write a callback for it ?

There are couple of useful examples I have bookmarked from previous
posts ...
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/...
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/...

Riad.

Eric,

It's not entirely obvious what you're trying to achieve. Is this list a list of
choices in a cyclic field, or is it a list of entries in a list box? Or is it
some list completely outside the form? What triggers the change?

Sorry, more questions than answers... but callbacks could well be the answer, as
Riad said.

Andrew.
Riad and Andrew,

I went home last night thinking I did not give enough information to
articulate what I was trying to accomplish, sorry about that. I did
look over the example and learned a few things, but I am still fuzzy
on how I do what I want.

So, from the code below if I hit "apply" a procedure is called and
with that procedure I want to "refresh"(maybe bad wording) the list
box. How do I do that?

Thank you for your help in advance,
Eric



let((EFDualMode EFSortBy EFNetsBox)

EFDualMode = hiCreateRadioField(
?name 'EFDualMode
?prompt "Sort data by?"
?value "Instance"
?defValue "Instance"
?choices list("Instance" "Cellname" "Pin" "Net")
)
)

EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Instance, Net, Cellname or Pin"
?editable nil
?value ""
)

EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeinst()"
?numRows length(EFNet_list)
)

;;; defines the form

hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Nets"
?callback "EFSortExecution()"
?fields
list(
EFDualMode
EFSortBy
EFNetsBox
)

) ; hiCreateAppForm
)
hiDisplayForm(EFInstanceNetsForm)

procedure(EFSortExecution()
printf("Procdure to refresh the List Box")
)
 
On Apr 15, 10:40 am, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
eric.d.fitzsimm...@gmail.com wrote, on 04/15/09 14:46:







Riad and Andrew,

I went home last night thinking I did not give enough information to
articulate what I was trying to accomplish, sorry about that.   I did
look over the example and learned a few things, but I am still fuzzy
on how I do what I want.

So, from the code below if I hit "apply" a procedure is called and
with that procedure I want to "refresh"(maybe bad wording) the list
box.   How do I do that?

Thank you for your help in advance,
Eric

Eric,

You had a parenthesis in the wrong place, which I fixed (after the EFDualMode
variable definition). I think you want something like this:

let((EFDualMode EFSortBy EFNetsBox)

EFDualMode = hiCreateRadioField(
        ?name 'EFDualMode
        ?prompt "Sort data by?"
        ?value "Instance"
        ?defValue "Instance"
        ?choices list("Instance" "Cellname" "Pin" "Net")
        )

EFSortBy = hiCreateStringField(
        ?name 'EFSortBy
        ?prompt "Instance, Net, Cellname or Pin"
        ?editable nil
        ?value ""
)

EFNetsBox = hiCreateListBoxField(
       ?name            'EFListBoxField
       ?prompt          " "
       ?choices         EFNet_list
       ?value           nil
       ?multipleSelect  nil
       ?changeCB        "EFprobe()"
       ?doubleClickCB   "EFprobeinst()"
       ?numRows                 length(EFNet_list)
)

;;; defines the form

hiCreateAppForm(
        ?name        'EFInstanceNetsForm
        ?formTitle   "Instance Nets"
        ?callback    "EFSortExecution()"
        ?fields
        list(
           EFDualMode
            EFSortBy
            EFNetsBox
           )

    ) ; hiCreateAppForm
)
hiDisplayForm(EFInstanceNetsForm)

procedure(EFSortExecution()
let((currentList)
    printf("Procdure to refresh the List Box")
    currentList=EFInstanceNetsForm->EFListBoxField->choices
    ; silly examples of updating the choices
    EFInstanceNetsForm->EFListBoxField->choices=reverse(currentList)
    ;EFInstanceNetsForm->EFListBoxField->choices=cdr(currentList)
    )
)

Regards,

Andrew.- Hide quoted text -

- Show quoted text -
Andrew,

It appears I was working hard at making something simple really
complicated.

Thank you very much from saving me from myself,
Eric
 

Welcome to EDABoard.com

Sponsor

Back
Top