The update function is called by Builder Xcessory to display a value in a resource type editor. The value can be passed as either a string (the most common case) or as a value of the actual type. The string value used by Builder Xcessory is the same value that the fetch function returns.
Note: For Builder Xcessory to use a new resource type correctly, there must be a resource converter to convert a string representation of the resource to the actual expected type. Most widgets provide this type of converter for new types to allow the resource to be set from an application defaults file. See your Xt documentation for more information about resource converters.
The update function has the following function prototype:
val_str String representation of the value of the resource that should be displayed in the resource type editor. This is the most common way Builder Xcessory passes a value to be displayed. Always try to use this value first when determining what to display. This value can be NULL.
val_ptr Pointer to the value to display in the resource type. You must cast this pointer to the correct type. This method of passing a value to display is used rarely by Builder Xcessory. In most cases, this value is NULL.
wgt Widget that is above the top-level container of your resource type editor. For an extended editor, wgt is the shell widget containing the editor. For a simple editor, wgt is the parent widget of your top-level container.
data Pointer value that you supplied in the creation function. If you did not specify a value, data is NULL.
bx_internal Used by Builder Xcessory. Do not modify this value.
As an example of the resource type editor update function, we'll examine the functions for the XmNjustify resource of the XmDumbLabel widget:
... Set Toggle Button Values ...