ftp.nice.ch/pub/next/developer/resources/palettes/PSActionPalette.README

This is the README for PSActionPalette.NI.bs.tar.gz [Download] [Browse] [Up]

PSActionPallete implements an object class and InterfaceBuilder palette that can be viewed as a way to add simple scripting to InterfaceBuilder (using PostScript as the scripting language) or as a simple PostScript previewer object class.

The PSAction object responds to the standard take*ValueFrom: messages (e.g. takeIntValueFrom:) and puts the value received on top of PostScript's stack along with the PostScript code associated with the PSAction object (usually scripted from within InterfaceBuilder).  This is executed and the PSAction object checks the datatype of the result left on PostScript's stack, pops it and sends the appropriate take*ValueFrom: message onto the PSAction object's own target.  (Error messages generated in the PostScript execution can optionally be directed to a Text object.)

This gives you the ability to add PostScript code between a Control object and it's target, in InterfaceBuilder, to adjust the result to something more appropriate for your program to take as input.  (You can adjust the output of a slider to be non-linear, round results to increments of 0.5, substitute strings like high, medium & low for numeric values, etc.)

Additionally, you can optionally associate a view with the PSAction object where PostScript graphics generated by the script will be rendered.  This, for example, gives you a way to implement visual feedback to the user directly in InterfaceBuilder.  (The PSActionExamples *.nib file mentioned below has simple examples of giving feedback about the radius of a circle and gray shade as determined by a slider.)

The current release of PSActionPalette was built and tested under the 3.2 release of NeXTSTEP -- use under earlier (or later) versions may require modification.

Christopher Lane <lane@camis.stanford.edu>
Symbolic Systems Resources Group
Knowledge Systems Laboratory
Stanford University

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