Marcel Taeumel uploaded a new version of Services-Base to project The Trunk:
http://source.squeak.org/trunk/Services-Base-jr.68.mcz ==================== Summary ==================== Name: Services-Base-jr.68 Author: jr Time: 16 February 2020, 10:22:29.735993 am UUID: 03c9d902-3e2f-9246-817a-004adeefea60 Ancestors: Services-Base-eem.67 Small discoverability fixes to services class comments. =============== Diff against Services-Base-eem.67 =============== Item was changed: Preferences subclass: #ServicePreferences instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Services-Base-GUI'! + !ServicePreferences commentStamp: 'jr 2/16/2020 10:19' prior: 0! + I store the preferences related to the services framework. The preferences are editable via the Services Browser, based on Hernan Tylim's Preference Browser. - !ServicePreferences commentStamp: 'rr 7/10/2006 15:36' prior: 0! - I store the preferences related to the servicse framework. The preferences are editable via the Services Browser, based on Hernan Tylim's Preference Browser. The main preference categories for services are: -- keyboard shortcuts -- : several text preferences, one per keyboard shortcuts. To edit them, enter a service identifier (equal to the method name under which it is defined in its ServiceProvider), and accept with alt-s or enter -- menu contents -- : All the service categories in the image have a text preference under here. To edit it, enter the services identifiers you wish to put in this category, separating them with a single space character. The order is important: it defines the order of the items in menus. -- settings -- : general boolean preferences. Then there is a preference category for each provider in the image. Under each, you will find: A boolean preference for each service in the image. If it is false, the service will not appear in menus. The text preference for each service category defined by the service provider. This is the same as the one appearing in the menu contents preference category.! Item was changed: Object subclass: #ServiceProvider instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Services-Base'! + !ServiceProvider commentStamp: 'jr 2/16/2020 10:20' prior: 0! - !ServiceProvider commentStamp: 'rr 7/10/2006 15:08' prior: 0! A ServiceProvider references services that are relevant to a given application. Each application that wishes to use the Services framework must subclass a ServiceProvider. This class must define a 'services' method category. Each method implemented in this category will be automatically called by the framework. Each of these method should be a unary message (taking no argument), and return a fully initialised instance of ServiceAction or ServiceCategory. There are three possible patterns: 1) serviceIdentifierAndMethodName ^ ServiceAction text: 'Menu item text' button: 'Button text' description: 'Longer text that appears in help balloons' action: [:r | "Code block fetching data from the requestor instance, r, that is passed to the block"] 2) serviceIdentifierAndMethodName ^ ServiceAction text: 'Menu item text' button: 'Button text' description: 'Longer text that appears in help balloons' action: [:r | "Code block fetching data from the requestor instance, r, that is passed to the block"] condition: [:r | "second block returning true if the service can be used at the time being, false otherwise. Data can still be fetched from the requestor instance"] 3) methodNameAndServiceCategoryId ^ ServiceCategory text: 'Menu text' button: 'Button text' description: 'Longer descriptive text appearing in help balloons' The organisation of services into categories, and the services bound to keyboard shortcuts are + specified using the Services Browser (see the comment on the class ServicePreferences for more details). When editing preferences, they are saved as methods on the ServiceProvider, all defined - specified using the Services Browser (see the comment on the class ServicesPreferences for more details). When editing preferences, they are saved as methods on the ServiceProvider, all defined in the 'saved preferences' method category. Each of thesse methods stores preferences that the provider can replay. ! |
Free forum by Nabble | Edit this page |