In addition to the usual Cut, Copy, Paste, Delete Select All, this menu also contains:
@itemize @bullet
@item Group @*
Which produces a submenu
@itemize @bullet
@item In Splitview @*
Groups views into an NSSplitView. Gorm does this based on the relative positions of the views being grouped. It determines the orientation and the order of th views and then groups them either vertically or horizontally in the order they appear on the screen.
@item In Box @*
Simply groups all of the views into one NSBox.
@item In ScrollView @*
Simply groups all of the views into one NSScrollView.
@item Ungroup @*
Ungroups the contained views.
@end itemize
@item Set Name @*
This allows the user to set a name for a given object in the Objects view in the main document window.
@item Disable Guideline @*
This item toggles between Enable Guideline and Disable Guideline. This allows the user to turn on or off the guides which appear when placing views in a window or view in Gorm.
First you need to understand a few basic concepts. Gorm's main window includes a few standard entries which must be explained before we can proceed.
They are:
@itemize @bullet
@item NSOwner
@item NSFirst
@item NSFont
@end itemize
@section What is NSOwner?
NSOwner is the class which ``owns'' the interface. This is, by default, NSApplication, but it can be any class you like. You can change it by selecting NSOwner in the document window and going to the ``Custom Class'' inspector in the inspectors window. From there, you should see all of the classes which the NSOwner can assume. We'll discuss more about this later when we go over how to create a new application
@section What is NSFirst?
NSFirst is your interface to the responder chain. NSFirst is representative of the current ``first responder'' in the application. When you want a message, such as a changeFont: message, to go to the current first responder from, say, a menu, you connect the menu item to the NSFirst object in the document window. By doing this, it means that whichever object has first responder status at that time in the application will become the reciever of the ``changeFont:'' message.
@subsection Responders
A responder is any subclass of NSResponder. This includes NSWindow, NSView and all of the NSControl subclasses.
@subsection The Responder Chain
The responder chain is a sequence of objects which are called to determine where a message sent to the first responder will go. A message invoked on the first responder will be invoked on the first object in the responder chain which responds to that message.
The object which this message will be called on is determined in the method [NSApplication targetForAction:]. The call sequence is as follows, it will only proceed to the next step in each case if the current step fails to respond to the message which was invoked:
@itemize @bullet
@item The firstResponder of the keyWindow, if one exists.
@item Iterates through all responders by pulling each in the linked list of responders for the key window.
@item It then tries the keyWindow.
@item Then the keyWindow's delegate
@item if the application is document based it tries the document controller object for the key window.
@item then it tries the mainWindow's list of responders (as above)
@item the mainWindow's delegate
@item if the app is document based, it tries the document controller for the main window
@item and finally, it tries the NSApplication delegate.
@end itemize
If all of the options in this list are exhausted, it then gives up and returns nil for the object which is to respond.
@section What is NSFont
NSFont represents the NSFontManager object for the application. This object is a shared singleton. This means that, for any given app, there should be only one instance of the object. This object is generally added to the document window when another objec, such as a Font menu item, is added to the interface, which, in turn, requires that this object be added to the document.
@section Creating A New Application
First you need to start Gorm up. You can either do this by doing @samp{gopen Gorm.app} from a command line prompt, or you can invoke it from the Dock or from the workspace's file viewer.
You then need to select the @samp{Document} menu, and then @samp{New Application}. This should produce a new document window, with a menu and an empty window.