Previous: Matching Resource Names, Up: Accessing Resource Values [Contents][Index]
The following paragraphs describe the CLX functions used to return a value from a resource database.
A resource-database.
A string or symbol giving an attribute name from a complete resource name.
A string or symbol giving an attribute class name from a complete resource class.
The path list from a complete resource name. path-name and path-class must have the same length.
The path list from a complete resource class. path-name and path-class must have the same length.
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.
Type t.
A resource-database.
The path list from a complete resource name. path-name and path-classmust have the same length.
The path list from a complete resource class. path-name and path-class must have the same length.
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.
Type list.
A search table returned by get-search-table.
A string or symbol giving an attribute name from a complete resource name.
A string or symbol giving an attribute class name from a complete resource class.
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.
Type t.
Previous: Matching Resource Names, Up: Accessing Resource Values [Contents][Index]