This is ExampleGuide.rtf in view mode; [Download] [Up]
EXAMPLE REFERENCE GUIDE Preliminary Version, September 24, 1991 Overview In order to better utilize the Examples and MiniExamples, we have started a preliminary categorization of their functionalities, which will help you quickly find a topics of interest. To search for all functionalities related to one single example, you can do a search on that particular example name. To search on a particular method name, we strongly recommend that you index the /NextDeveloper/Examples using Digital Librarian. The following categories have been defined: Animation Appkit Common Classes Device Drivers Documents DSP Programming Events Graphics Interface Builder Mach/OS Makefiles Miscellaneous Music NeXTStep Programming Objective-C Panels Performance Issues Postscript Printing Services Sound UI Objects Unix Workspace Note: This guide only covers the /NextDeveloper/Examples and all the currently released MiniExamples (up to September 1991). Not all examples are fully described yet. Please send your comments and suggestions to example_feedback@next.com. ANIMATION Animating your application icon Acceptor (Controller.m) Creating smooth animation by adapting to environmental conditions WhatADrag (Animator.m) BreakApp (BreakView.m) Using timed entries for animation Acceptor (Controller.m) Lines (LinesView.m) BreakApp Using multiple threads for animation SortingInAction APPKIT Application Delegate methods Draw Graph ScrollDoodScroll (Controller.m) Cell How to draw your own stuff (text, images) inside a cell ScrollDoodScroll (CustomCell.m) ImageText (MiniExample) ClipView Scrolling two ClipViews contained in the same scrollview ScrollDoodScroll (TileScrollView.m) Listener Creating a custom Listener via msgwrap ScreenSender (BitMover.msg) Receiving data from another application ScreenSender Matrix Placing a matrix in a scrollview CellScrollView (MiniExample) ScrollDoodScroll (Controller.m) Menu How to autoupdate menu items Draw (DrawApp.m) How to enable/disable menu items TIFFandEPS (MiniExample) NXBrowser BusyBox (lazy browser) NormalBrowser (normal browser, MiniExample) NXCursor How to switch cursors Draw NXImage How to convert to different graphics formats Draw TIFFtoEPS (MiniExample) How to create a TIFF file using NXBitmapImageRep and streams Grabber (MiniExample) TIFFandEPS (MiniExample) Using custom image representations (NXCustomImageRep) BreakApp (BreakView.m) Using NXImages to display TIFF images within a view Acceptor (AppIconView.m) ScrollTiff (MiniExample) NXLiveVideoView (for ND users only) How to use this class's features (video in a window, etc.) VideoApp NXSplitView How to make a horizontal splitview BananaSplit (MiniExample) How to make a vertical splitview ZooView (MiniExample) OpenPanel Accepting multiple files from the OpenPanel Draw (DrawApp.m) Graph (GraphApp.m) Customize Open Panel Draw PageLayout Panel Customize PageLayout Panel Draw PaginationLab (MiniExample) Pasteboard Manipulating Pasteboard data Yap (PSText.m) Graph (GraphDoc.m) Draw (GraphicView.m) Matching an apps list of data types (in order of preference) against the data on a Pasteboard Draw (GraphicView.m) PrintInfo Customize the PrintInfo object to format your document PaginationLab (MiniExample) Yap (YapDocument.m) Draw (DrawDocument.m) SavePanel Create a Save Panel Draw (DrawDocument.m) Customize a Save Panel Draw Ensemble TIFFandEPS (MiniExample; shows MAJOR modification of Save Panel) ScrollView How to implement autoscrolling ScrollDoodScroll (NiftyMatrix.m) Draw Loading a TIFF file into a ScrollView ScrollTiff (MiniExample) Overriding the tile method ScrollDoodScroll (TileScrollView.m) ScrollingText(MiniExample; PageScrollView.m) Placing controls in a ScrollView ScrollDoodScroll (TileScrollView.m) ScrollingText (PageScrollView.m) Placing ªrulersº within a ScrollView ScrollDoodScroll (TileScrollView.m) Draw Scrolling two ClipViews contained in the same ScrollView ScrollDoodScroll (TileScrollView.m) ScrollView with customized cells ScrollDoodScroll CellScrollView (MiniExample) Slider How to customize slider and slider cells Ensemble Speaker Creating a communication link with another application Acceptor (Controller.m) ScreenSender (TeachView.m) Sending data to another application ScreenSender Creating a custom Speaker via msgwrap ScreenSender (BitMover.msg) Text Editing Rich Text Draw (TextGraphic.m) How to convert (X,Y) coordinates in the text object to a character position ConvertXYToChar (MiniExample) How to swap an existing text object in a scrollview ConvertXYToChar (MiniExample) Placing customized cells in text object ImageText (MiniExample) Text entry validation BusyBox (GaugeView.m) Text filter functions FilterFunctions (MiniExample) View Adding an accessory view Draw (DrawApp.m) ToolInspector TIFFandEPS (MiniEzample; ImageReader.m) How frames, bounds and rotation affect each other VisibleView Window Constraining window size through delegation Lines (Lines.m) PaintLab (ImageCompositor.m) ScrollDoodScroll (Controller.m) Creating ªnon-rectangularº windows (ala Workspace) WhatADrag Delegate methods TIFFandEPS (MiniExample; ImageReader.m) Detecting when a user closes an unsaved window (through delegation) Draw (DrawDocument) WhatsUpDoc (MiniExample) Dragging images between windows (e.g. Interface Builder palettes) WhatADrag COMMON CLASSES Hashtable How to use hashtables Ensemble List Storing objects in a list Acceptor (AppIconView.m, CalendarView.m) WhatADrag (Controller.m) Storage Storing data in and retrieving data from a Storage object WhatADrag (AcceptWindow.m) DEVICE DRIVERS Floppy Disk /NextDeveloper/Examples/Floppy Midi Driver /NextDeveloper/Examples/MidiDriver (play/record a midifile) See also /NextDeveloper/Examples/MusicKit/Ensemble, MidiEcho, MidiPlay, MidiLoop, MidiRecord, playscorefilemidi SCSI Scsi DOCUMENTS Archiving/unarchiving custom documents Draw Ensemble Graph (GraphDoc.m) WhatsUpDoc (MiniExample) How to handle document editing Draw SoundEditor TextLab WhatsUpDoc (MiniExample) How to handle different document types (EPS, TIFF, custom) Draw How to manage multiple documents Draw Ensemble WhatsUpDoc (MiniExample) Yap SoundEditor How to implement Review Unsaved WhatsUpDoc (MiniExample) How to use pasteboards to export your data (TIFF or EPS) to other applications Draw Graph DSP PROGRAMMING See also /NextDeveloper/Examples/DSP How to convert an array of raw data into graphical data Mandelbrot Using DSP as a stream oriented number cruncher Mandelbrot (DSPRecorder) Receiving asynchronous data from the DSP Mandelbrot (DSPRecorder) EVENTS Handling mouse clicks and drags in a view (mouseDown:) PaintLab (MouseTracker) Draw (GridView.m) Intercepting keyboard events Draw Peeking/Intercepting mouse events BusyBox (BusyBoxApp.m) Draw Ensemble (EnsembleApp.m) Tracking mouse cursors Draw GRAPHICS (see also POSTSCRIPT) Compositing Techniques Draw CompositeLab ScrollDoodScroll (NiftyMatrix.m) Custom draw methods BreakApp Drawing a ªwellº Acceptor (TiffView.m) How to group/select/resize different graphics objects Draw Imaging PostScript code in a separate WindowServer context Yap (YapOutput.m) Imaging raw data into a window Mandelbrot (MandelView.m) Loading a TIFF file into a scrollview ScrollTiff (MiniExample) Managing an offscreen image/undo buffer Yap (YapOutput.m) PaintLab (ImageCompositor.m) Placing graphic objects in Text object ImageText (Controller.m; MiniExample) PostScript userpath ªobjectº Lines (UserPath.m) Scaling/Rotating an Image BusyBox Rotato (MiniExample) Writing raw window bits to a stream Draw (GraphicView.m) INTERFACE BUILDER Create Custom Palettes InterfaceBuilder/BlinkPalette Interface Builder/SketchPalette MACH/OS Multiple threads programming SortingInAction Ensemble (Music Kit thread and Appkit thread) Mach Messaging SortingInAction MAKEFILES Makefile.postamble for compiling/creating addtional files after the main compilation Acceptor Graph Makefile.postamble for creating app wrapper AskMe (MiniExample) BusyBox Makefile.preamble for dynamically loaded code Acceptor Makefile.preamble for placing files into a MachO segment ScrollDoodScroll Draw Makefile.preamble for linking against the MallocDebug library Graph Makefile.postamble for automatically generating application version information Graph MISCELLANEOUS Algorithmic generation of music notes using Note Filters Ensemble A parser using Unix yacc and lex Graph Different Sorting Algorithms SortingInAction Generating the Mandelbrot set Mandelbrot MUSIC See also /NextDeveloper/Examples/MusicKit Simple UI for changing Music Notes Parameters BreakApp (SoundGenerator Class) Simple UI for handling MIDI output and adjusting MIDI parameters Ensemble How to use MusicKit Note Filter Class Ensemble How to use Music Kit Instrument Class Ensemble NeXTStep PROGRAMMING Additional outlet initialization with setMyOutlet methods Grabber(MiniExample; Grabber.m) Exception Handling Graph (While archiving/unarchiving documents) Getting data from a MachO segment ScrollDoodScroll How to mix C++ and Objective C CalculatorLab++ How to implement inheritance SortingInAction (GenericSort abstract class) How to make your application a Workspace drag service requestor Draw (DrawDocument.m) Acceptor (Controller.m) How to make your application a Workspace drag service provider Acceptor (IconView.m) Implementing application preferences Yap (YapApp.m) Initializing/reading defaults Draw Yap Localization AskMe (MiniExample) MandelBrot Loading Objective C classes dynamically Acceptor Multiple Nib Files BusyBox (and almost all examples) Reusing zones Draw (DrawDocument.m) Yap (YapDocument.m) Use of temporary zones (NXCreateZone, NXDestroyZone) Draw (GraphicView.m) Use of Timed Entry Routines Acceptor (Controller.m) BreakApp Use of NXStringTables Most examples Objective-C Using the ª@interfaceº construct to define private methods Graph (GraphDoc.m) Using categories Mandelbrot (LanguageApp.m) PERFORMANCE ISSUES (OPTIMIZATION) How to optimize scrolling using NXImage instead of Postscript ScrollDoodScroll (PostscriptView.m) How to use offscreen cache for faster drawing Draw ScrollDooodScroll TIFFandEPS (MiniExample) Performance Tools Self-Teaching Guide Performance Tuning (MiniExample) Using userpaths for top performance drawing Lines Draw Graph Zone allocation Draw POSTSCRIPT Copy bits from WS window to an NXImage ImageText (MiniExample) Drawing Balls BreakApp Drawing Polygons, Circles, Rectangles Draw Viewing Postscript output Yap SERVICES How to export your "Services" to other applications AtYourService (MiniExample) How to export your TIFF/EPS Data to other applications Draw (with Pasteboards) Draw (with Services) SOUND See also /NextDeveloper/Examples/Sound How to use Sound, SoundView, and SoundMeter SoundEditor UI OBJECTS All standard UI objects and guidelines for their usage BusyBox Calendar View (similar to the calendar object in Mail and Preferences) Acceptor (CalendarView.m) Clock View (similar to the clock object in Mail and Preferences) Acceptor (ClockView.m) Busy Box (both analog and digital display) Color Picker (Color Well) CompositeLab Creating Inspectors ToolInspector (ToolChest.m) Creating Workspace-style ªnon rectangularº windows WhatADrag Creating Workspace-style highlighting ToolInspector (ToolView.m) Custom scrollview with text and graphics aligned in columns (like Mail) ScrollDoodScroll Dragging images between windows (e.g. Interface Builder palettes) WhatADrag (Controller.m) Find Panel Object FindIt (MiniExample) Generic Help Object Busy Box How to enable/disable Forms and Matrices TIFFandEPS (MiniExample) How to place rulers and other special controls in a ScrollView ScrollDoodScroll (TileScrollView.m) ScrollingText (MiniExample; PageUp/Down controls, Zoom pop-up list) How to use PopUpLists Draw TIFFandEPS (MiniExample) InfoPanel Draw LipService Icon ImageText (MiniExample) Reordering items in a list (dragging matrix items to different locations) ScrollDoodScroll (NiftyMatrix.m) Standard Play/Stop/Pause/Record Buttons SoundEditor Virtual music keyboard, for entering musical notes with the mouse Ensemble (clavier.nib, Clavier.m) UNIX An expression parser using Unix yacc and lex Graph Communicating with UNIX processes from a NeXTstep application Subprocess (Subprocess.m) Making the InfoPanel automatically display the application's version number Graph (Makefile.postamble, GraphApp.m) Opening a pty Subprocess (Subprocess.m) UNIX time functions Acceptor (Controller.m) WORKSPACE Creating a communication link with the Workspace ScreenSender (TeachView.m) Creating Workspace-style highlighting ToolInspector (ToolView.m) How to drag icons from the workspace into your app Draw ImageText (MiniExample) Acceptor (Controller.m) How to open your documents from the Workspace Draw Graph (GraphApp.m) How to get file information (its type, etc) Acceptor (Controller.m) How to drag icons from your application into the Workspace Acceptor (IconView.m)
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.