home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / Newton Platform Info / Newton 2.0 Sample Code / Routing / CustomRoute-2 / README.CustomRoute < prev   
Encoding:
Text File  |  1995-11-21  |  2.3 KB  |  51 lines  |  [TEXT/R*ch]

  1. /*
  2. **      Newton Developer Technical Support Sample Code
  3. **
  4. **      Custom Route, a Newton 2.0 routing example
  5. **
  6. **      by J. Christopher Bell, Newton Developer Technical Support
  7. **
  8. **      Copyright © 1994-5 by Apple Computer, Inc.  All rights reserved.
  9. **
  10. **      You may incorporate this sample code into your applications without
  11. **      restriction.  This sample code has been provided "AS IS" and the
  12. **      responsibility for its operation is 100% yours.  You are not
  13. **      permitted to modify and redistribute the source as "DTS Sample Code."
  14. **      If you are going to re-distribute the source, we require that you
  15. **      make it clear in the source that the code was descended from
  16. **      Apple-provided sample code, but that you've made changes.
  17. */
  18.  
  19. This example shows how to set up your routing formats and routeScripts
  20. for Newton 2.0. 
  21.  
  22. In the Newton 2.0 world, applications do not enable a specific transport
  23. but rather transports supporting compatible paradigms like "view stuff", 
  24. "frame stuff". 
  25.  
  26. Unlike Newton 1.x Routing, the action button is context sensitive, which
  27. means that the action button uses its location in the view hierarchy to
  28. figure how to display/route an item. It does not require your base view
  29. to handle everything or for your application to have a single global
  30. routing frame which applies to your application.
  31.  
  32. CustomRoute takes advantage of context sensitive routing by displaying
  33. a subview an the application, to attempt to illustrate which messages
  34. are context sensitive and which messages MUST be implemented in your
  35. base view.
  36.  
  37. In the top subview, there is data which corresponds to a format which
  38. can display "view stuff" and "text"... which means that the dataTypes slot
  39. value is ['view, 'text].
  40.  
  41. This sample also handles put away for beam, mail, or any third party
  42. 'frame transport that comes along. Note that your putawayscript should
  43. check to see whether it can handle the data before trying to put it away!
  44.  
  45. In order handle print and fax, you must register at least one protoPrintFormat.
  46. In order handle beam and mail, you must register at least protoFrameFormat.
  47.  
  48. If you want to handle just frame or just text, use a protoFrameFormat and
  49. override the dataTypes slot to be ['frame] or ['text] and be sure to set the
  50. text in the format's textScript if necessary.
  51.