Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

ddHiCreateViewComboField

ddHiCreateViewComboField(
?name s_fieldName 
[ ?prompt t_fieldPrompt ] 
[ ?value t_currentValue ]
[ ?defValue t_defaultValue ] 
[ ?callback g_callback ]
[ ?editable g_editable ]
[ ?enabled g_enabled ]
[ ?invisible g_invisible ]
[ ?nextField g_nextField ]
[ ?toolTip t_toolTip ] 
[ ?viewTypes l_viewTypes ]
[ ?validationType g_validationType ] 
[ ?highlightType g_highlightType ] 
) 
=> r_comboField

Description

Creates a customized View combo field, which is an extension of a regular combo field, for selecting views.

Arguments

?name s_fieldName

A handle to this field within a form. To reference it, use formHandle-><fieldName>

?prompt t_fieldPrompt

  

A string specifying the prompt for the field. To reference it, use formHandle-><fieldName>->prompt

?value t_currentValue

  

The initial and current values of this field. To reference it, use formHandle-><fieldName>->value

?defValue t_defaultValue

  

The default value of the field. This value is equal to the initial entry in t_currentValue, if t_defaultValue is not specified. To reference the default value, use formHandle-><fieldName>->defValue

?callback g_callback

  

A string, symbol, or function object type callback that is executed if the value of the field changes. If a new value is typed in, the callback is called when the field has “lost focus”. This happens for example, when you move the pointer outside the form, or tab to another field, or when you select any button in the form.

  • If a new value is selected from the drop-down list, then the callback is called immediately, not when the field loses focus.
  • If the callback is of string type, you can specify one or more SKILL functions or even multiple SKILL statements that get executed when the value of the field changes.

?editable g_editable

  

Edits the field.

?enabled g_enabled

  

Specifies whether the field is enabled. The default value is t.

?invisible g_invisible

  

Specifies whether the field is invisible. The default value is nil.

?nextField g_nextField

  

A symbol or string indicating the next field to bring into focus when the Tab key is pressed. If you specify nil or do not specify this argument, the Tab traversal order is determined by the tabOrderIsAddOrder argument of hiCreateAppForm or hiCreateScrollRegion. If the tabOrderIsAddOrder argument is not set or if its value is nil, the default traversal order is based on the form layout —left-to-right and top-to-bottom— beginning with the field at the top-left corner of the form.

?toolTip t_toolTip

  

The tool tip that is displayed when the pointer hovers over the field.

?viewTypes l_viewTypes

  

A list of DFII view types (string). The list is used for view-type based filtering in the view combo field. A view is made available for selection only if the view type associated with its master file is a member of the l_viewTypes list.

?validationType g_validationType

  

Specifies the criteria that determines if the input is valid or not. Acceptable values (symbol) are:

  • allowAny: No restriction on input type.
  • allowExisting (default): Allow existing unfiltered data returned by (DDPI) generator.
  • allowNew: Allow data other than the return value of (DDPI) generator.

?highlightType g_highlightType

  

Specifies when and how a widget is to be highlighted. Acceptable values (symbol) are:

  • background
  • highlight
  • error
  • highlightInvalidText (default)

The first three values have the same definitions as given for the g_highlighType argument of hiHighlightField.

Setting the property to highlightInvalidText turns on automatic highlighting, which highlights the widget when an invalid input is entered. The validity of the input is determined based on the setting of the validationType property.

Values Returned

r_comboField

Returns the combo field.

Examples

A View combo field is created.

trCreateBlockViewName = ddHiCreateViewComboField(
    ?name 'viewName
    ?prompt "View"
    ?defValue "symbol"
    ?value "symbol"
    ?callback "trCreateBlockViewNameCB ( trCreateBlockForm 'viewName )"
)

Additional Information

On the Library, Cell, and View combo boxes, you have a filter property that enables you to customize your search. You need to specify the value of the filter property as a list, where the first member denotes the method for filtering.

The following filtering methods are supported:

In a custom filter, when the second member is a SKILL function (callable), the function is used as the accepts method. It is called with an argument of ddId type. A dd object becomes available for the selection in the combo box only if the function returns a non-nil value.

If the function returns nil on a specified dd object, the object is considered as non-existent. If you assign nil to the filter property, filtering gets turned off on the LCV combo box.

When a SKILL function (callable) is given as a custom filter on a View combo box, a default preferred method is supplied. It always returns the first member of a specified dd objects list.

If an error occurs in a SKILL callable, the given dd object is regarded as accepted. A maximum of three invocations are made if an error occurs in the SKILL callable.

Alternatively, the second member can be an instance of ddHiObjFilter, or an instance of a subclass of ddHiObjFilter. The ddHiObjFilter class defines two override methods, ddoAccepts and ddoPreferred.

Both accepts and preferred methods must be prefixed with ddo, where o indicates override.

If an error occurs in the ddoAccepts method, the specified dd object is considered as accepted. Whereas, if an error occurs in the ddoPreferred method, the first dd object in the specified list is used.

A maximum of three invocations are made if an error occurs in any of these methods.

Related Topics

Form and Field Functions

ddoAccepts

ddoPreferred

ddHiLinkFields


Return to top
 ⠀
X