Simple Text Editor
  1. Start up Project Builder.
  2. Select File -> New Project
  3. Select Cocoa Document-based Application from the Assistant window and click Finish.
  4. Name your application. I named it SimpleTextEd. Then, click on Finish.
  5. Expand the Resources folder, and double-click on the MyDocument.nib file. Interface Builder will open up the nib file.
  6. In the Cocoa-Data palette, click on the Cocoa Data Views button.
  7. Select a NSTextView and drag it over to your document Window. The Window should say Your document contents here.
  8. Stretch the NSTextView so it fills up the entire Window.
  9. Go to Tools -> Show Info. This will bring up another palette, which should read NSTextView Info.
  10. For the Attributes Options, click on Graphics allowed and Undo allowed.
  11. Switch to the Size (instead of Attributes). In the Autosizing box, click on the inner box so it creates two twisted coils perpendicular to each other. This will resize the NSTextView if the window is resized.
  12. Save your work.
  13. Go back to Project Builder and compile your program by clicking on the hammer icon. Once that is complete, click on the Run Monitor shaped Run icon to run your program.
  14. Now you should have a simple text editor which will allow you to write, copy, cut, and paste. However, you cannot save or load files or do more advanced features yet. For guidance on how to do that, check out Mike Beam's Giving the Simple Text Editor 'Legs' article.