[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

LISP Browser View - Callback Functions

SD-CREATE-COLUMN-DEFINITION Functions

Function Index Top of Page

Display Function

(defun <display-function-name> (node)
  )
node - BrowserNode struct
Return Value: {STRING}
String to be displayed for the given node.

Function Index Top of Page

Applicable Function

(defun <applicable-function-name> (node)
  )
node - BrowserNode struct
Return Value: {BOOLEAN}
This function should return true if the node is to be displayed or editable. If displaying or editing the node is to be inhibited then nil should be returned.

Function Index Top of Page

Edit Function

(defun <edit-function-name> (node value)
  )
node - BrowserNode struct
value - Result of inline editing operation
Return Value: {BOOLEAN}
The function receives the result of the inline editing operation. It is then free to process this value as desired. Return value is ignored by the caller.

Function Index Top of Page

SD-CREATE-BROWSER-CONFIGURATION Functions

Tree Item Function

(defun <tree-item-func-name> (plist)
  )
plist - Property list of columns and corresponding display strings
Return Value: {STRING}
This function receives a property list consisting of columns which were previously specified in the config parameter of sd-create-browser-configuration, and the corresponding display string for each column. This means that the user can customize what is displayed in the Tree Configuration section of the browser depending on the values of each column displayed in the configuration.
For example if the following is specified in the config parameter:
(:instance-name :contents-name :my-column)
then assuming that :my-column references no meaningful value then the function could be expected to be called with a parameter list like this:
(:instance-name "p1" :contents-name "-")
There would be no property list entry for :my-column because it does not contain a meaningful value.

Based on the values corresponding to each keyword this function can then determine what will be displayed. For example based on the above parameter list this function could decide to display the contents name only if it had a meaningful value and otherwise display only the instance name.
    (defun user-def-tree-display (plist)
      (let ( (contents  (getf plist :contents-name))
             (instance  (getf plist :instance-name))
             (my-column (getf plist :my-column "n/a")))
         (if (not (sd-string= contents "-"))
           (format nil "Model name : ~A  My Column : ~A" contents my-column)
         ;; else display the instance name
           (format nil "Instance name: ~A  My Column : ~A" instance my-column))
      )
    )
The string returned by the function is ultimately what will be displayed in the browser.
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2024 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved