P
PolyPusher
Guest
Hi All,
I am trying to write code to sort a list and wish to have the
hiCreateStringField modifyCallback detect changes in the field and
call the procedure for the sort(dynamically as user types in).
I have for the form below and I cut and paste some Cadence
documentation under that.
Thank you in advance for any help(example would be great!),
Eric
;=============================================
;section below defines form
;=============================================
EFWindowid=hiCreateIntField(
?name 'EFWindowid
?prompt "Window Number"
?value EFwindow_number
?callback "EFnew_window()"
?invisible t
)
;===================need help here==================
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Enter string to sort data by"
?callback "EFSortByString()"
?modifyCallback
?editable t
?value ""
);as each character is entered, use the t_modifyCallback argument.
;==============================================
EFSelectOrProbe = hiCreateRadioField(
?name 'EFSelectOrProbe
?prompt "Probe or Schematic Select"
?value "Probe"
?defValue "Probe"
?choices list("Probe" "Select")
)
EFDataSingleClick = hiCreateRadioField(
?name 'EFDataSingleClick
?prompt "Data type to perform Probe or Select"
?value "Net"
?defValue "Net"
?choices list("Instance" "Cellname" "InstTerm" "Net")
)
EFDeselectCurr = hiCreateButtonBoxField(
?name 'EFDeselectCurr
?prompt " "
?choices '("Undo" "Clear" "Auto Sort" "Refresh" "Reverse")
?callback '("EFDeselectCurrentCB()" "EFDeselectAllCB()"
"EFAutoSortCB()" "EFRefreshForm()" "EFReverseList()")
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeandzoom()"
?CBOnReselect t
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Viewer. Data Format:Instance.Cellname.Term
(Pin) - Net Name"
?buttonLayout 'OKCancel
?callback "EFSortExecutionCB(hiGetCurrentForm())"
?fields
list(
EFWindowid
EFSortBy
EFSelectOrProbe
EFDataSingleClick
EFDeselectCurr
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
t_modifyCallback
SKILL function to be executed whenever any change is made in the
text field, for example, by typing or pasting. The modify callback is
called when a change is detected in the field but before the change is
displayed.
The modify callback function is passed the following arguments:
s_fieldName t_latestTextValue g_sourceOfChange
where s_fieldName is the symbol of the field in which the change
was made, t_latestTextValue is the latest text value of the field, and
g_sourceOfChange is t or nil where t indicates that the change was
made programmatically (by changing the value of the field) and nil
indicates that the change was made by a user action.
The modify callback function should return the following:
t | nil | value
If the modify callback function returns t, the changes made to the
field are allowed and are displayed as they are entered. If the
function returns nil, the changes made to the field are not allowed
and are not displayed--the original value of the field is retained. If
the function returns some other value, it must be a string. This value
replaces the current value of the field.
t_focusInCallback
SKILL function to be executed whenever the field comes into
I am trying to write code to sort a list and wish to have the
hiCreateStringField modifyCallback detect changes in the field and
call the procedure for the sort(dynamically as user types in).
I have for the form below and I cut and paste some Cadence
documentation under that.
Thank you in advance for any help(example would be great!),
Eric
;=============================================
;section below defines form
;=============================================
EFWindowid=hiCreateIntField(
?name 'EFWindowid
?prompt "Window Number"
?value EFwindow_number
?callback "EFnew_window()"
?invisible t
)
;===================need help here==================
EFSortBy = hiCreateStringField(
?name 'EFSortBy
?prompt "Enter string to sort data by"
?callback "EFSortByString()"
?modifyCallback
?editable t
?value ""
);as each character is entered, use the t_modifyCallback argument.
;==============================================
EFSelectOrProbe = hiCreateRadioField(
?name 'EFSelectOrProbe
?prompt "Probe or Schematic Select"
?value "Probe"
?defValue "Probe"
?choices list("Probe" "Select")
)
EFDataSingleClick = hiCreateRadioField(
?name 'EFDataSingleClick
?prompt "Data type to perform Probe or Select"
?value "Net"
?defValue "Net"
?choices list("Instance" "Cellname" "InstTerm" "Net")
)
EFDeselectCurr = hiCreateButtonBoxField(
?name 'EFDeselectCurr
?prompt " "
?choices '("Undo" "Clear" "Auto Sort" "Refresh" "Reverse")
?callback '("EFDeselectCurrentCB()" "EFDeselectAllCB()"
"EFAutoSortCB()" "EFRefreshForm()" "EFReverseList()")
)
EFNetsBox = hiCreateListBoxField(
?name 'EFListBoxField
?prompt " "
?choices EFNet_list
?value nil
?multipleSelect nil
?changeCB "EFprobe()"
?doubleClickCB "EFprobeandzoom()"
?CBOnReselect t
?numRows length(EFNet_list)
)
;;; defines the form
hiCreateAppForm(
?name 'EFInstanceNetsForm
?formTitle "Instance Viewer. Data Format:Instance.Cellname.Term
(Pin) - Net Name"
?buttonLayout 'OKCancel
?callback "EFSortExecutionCB(hiGetCurrentForm())"
?fields
list(
EFWindowid
EFSortBy
EFSelectOrProbe
EFDataSingleClick
EFDeselectCurr
EFNetsBox
)
?help ""
) ; hiCreateAppForm
hiDisplayForm(EFInstanceNetsForm)
t_modifyCallback
SKILL function to be executed whenever any change is made in the
text field, for example, by typing or pasting. The modify callback is
called when a change is detected in the field but before the change is
displayed.
The modify callback function is passed the following arguments:
s_fieldName t_latestTextValue g_sourceOfChange
where s_fieldName is the symbol of the field in which the change
was made, t_latestTextValue is the latest text value of the field, and
g_sourceOfChange is t or nil where t indicates that the change was
made programmatically (by changing the value of the field) and nil
indicates that the change was made by a user action.
The modify callback function should return the following:
t | nil | value
If the modify callback function returns t, the changes made to the
field are allowed and are displayed as they are entered. If the
function returns nil, the changes made to the field are not allowed
and are not displayed--the original value of the field is retained. If
the function returns some other value, it must be a string. This value
replaces the current value of the field.
t_focusInCallback
SKILL function to be executed whenever the field comes into