Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Setting Resources
next up previous contents
Next: Resource Matching Up: Widget Resource Management Previous: Widget Resource Management

Setting Resources

A resource setting consists of a specification and a string value, separated by a colon. For widget resources, the specification part should follow the widget's hierarchy, using instance names, class names or a combination of both, and arrive at a resource variable instance name or class name. For example:

 
1		xbutton.quit.label: exit

2 XButton.Command.label: quit

3 XButton.quit.Label: done

The first example says that the label resource instance of the widget instance named quit, in the application instance xbutton should have the value exit. The second example says that the label resource instance of all widgets belonging to the Command widget class, in all applications belonging to the application class XButton, should have the value quit. The third example says that all resource instances belonging to the resource class Label, for a widget instance named quit, in all applications belonging to the application class XButton, should have the value done.

Using a period to delimit entries in the specification part of resource settings, as in the previous examples, is known as tight binding. Another method using an asterisk as a wildcard to match any number of class or instance names is known as loose binding For example:

 
1		*quit.label: exit

2 xbutton*label: quit

3 *label: done

The first example says that the label resource instance of widget instances named quit, in any application, should have the value exit. The second example says that the label resource instance of all widgets that have such a resource, in the application instance xbutton, should have the value quit. The third example says that the label resource instance of all widgets that have such a resource, in all applications, should have the value done.



next up previous contents
Next: Resource Matching Up: Widget Resource Management Previous: Widget Resource Management



JR Pitchers
Wed May 3 16:45:04 BST 1995


With any suggestions or questions please feel free to contact us