ftp.nice.ch/pub/next/developer/objc/fromnext/MiniExamples.91.9.s.tar.gz#/MiniExamples/AtYourService

AtYourService.iconheader
 

AtYourService.nib


 
AtYourService_main.m
[View AtYourService_main.m] 
DefaultHandler.h
[View DefaultHandler.h] 
DefaultHandler.m
[View DefaultHandler.m] 
IB.proj
 

Information.nib


 
Makefile
 
Makefile.preamble
 
MyDelegate.h
[View MyDelegate.h] 
MyDelegate.m
[View MyDelegate.m] 
README.rtf
[View README.rtf] 
ServicesHandler.h
[View ServicesHandler.h] 
ServicesHandler.m
[View ServicesHandler.m] 
Verifier.h
[View Verifier.h] 
Verifier.m
[View Verifier.m] 
WA.tiff
 
services
 

README.rtf

AtYourService
	Henry Krempel -- NeXT Developer Support

This example demonstrates how applications can export ĒServicesē to other applications (they will appear in other applications' Services menu).  AtYourService's services may be enabled or disabled via its Preferences panel (applications exporting services should provide some user interface for disabling the service, preventing the services menu from becoming overly cluttered).

Services are facilities that other applications can take advantage of.  The Application requesting Services does nothing but indicates which kinds of data it is willing to send and receive.  A service provider (like this application) accepts data on one of the system pasteboards and processes it.  This data may or may not be returned to the requestor.  AtYourService provides a number of simple text services, that will appear on other applications "Services" menu. "Edit" is a good application to try this out with.

Services Provided by this application are:


	Dictionary Sort	returns data in alphabetic order
	
	Numeric Sort	returns data in numeric order
	
	Reverse Sort	returns data in reverse sorted order.
	
	Set Sort Fields...	allows the user to set the fields that will be used as sort keys (see section below).
	
	Unique Sort	sorts the data and only returns lines that are unique.
	
	Capitalize	simple phrase capitalizer

	Timestamp	returns the time and date
	
	
Setting Sort Fields:

You can specify which columns AtYourService will use when sorting your data by using the Set Sort Fields... function. This will present you with a panel where you can specify which field (or column) will start and end your sort data.  Fields are numbered starting at one (not zero).  Normally a blank space would be used to separate fields,  but on this panel you can also specify an alternate separator character.

Installation Notes:

This application should be placed in a directory on your path (like ~/Apps, or one of the well known system Apps directories). To see the services appear,  you should log out and log back in to see the services menus updated.  The easiest way to Install AtYourService is to do a "make install" in the source directory.  The "AtYourService" binary must be in your ApplicationPath,  not "AtYourService.debug" (the file IB makes).

Enabling and disabling services only takes effect for applications that have not been launched yet.  To update the Services menu,  you should quit and restart the application.

Objects in AtYourService:

	MyDelegate	the main delegate for AtYourService.  This object is the Application's and Services delegate,  and contains all of the Services methods.
	
	DefaultHandler	Handles interactions with the Defaults system.
	
	ServicesHandler	handles requests to enable and disable services from the Preferences panel.
	
	Verifier	a text delegate that tests the validity of data entered on a text field.  The tag is used to store the valid length,  and the EntryType in the TextField is used to store the datatype (see the DefaultHandler object, where this is set up).

Note: Makefile.preamble contains a line that installs the services icon section when you are making AtYourService. Service providers should use a similar Makefile.preamble to make sure that the Services section is installed.

Not valid for 1.0
Valid for 2.0

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.