The following paragraphs describe the CLX functions used to return a value from a resource database.
get-resource | database attribute-name attribute-class path-name path-class | Function |
Returns the value of the resource binding in the database whose resource name most closely matches the complete resource name/class given by the path-name, path-class, attribute-name, and attribute-class. The lookup algorithm implements the precedence rules described previously to determine the closest match. When comparing name elements, case is significant only if both elements are strings; otherwise, element matching is case-insensitive.
|
get-search-table | database path-name path-class | Function |
Returns a table containing the subset of the database that matches the path-name and path-class. Resources using the same path-name and path-class can be accessed much more efficiently by using this table as an argument to get-search-resource.
|
get-search-resource | table attribute-name attribute-class | Function |
Returns the value of the resource binding in the search table that most closely matches the attribute-name and attribute-class. The table is computed by get-search-table and represents a set of resource bindings. The closest match is determined by the same algorithm used in get-resource. The following two forms are functionally equivalent: (get-resource database attribute-name attribute-class path-name path-class) (get-search-resource (get-search-table database path-name path-class) attribute-name attribute-class) However, the hard part of the search is done by get-search-table. Looking up values for several resource attributes that share the same path list can be done much more efficiently with calls to get-search-resource.
|