NSDocument

From GNUstepWiki
Revision as of 16:15, 3 September 2005 by 123 (talk | contribs)
Jump to navigation Jump to search

NSDocument is an AppKit class used to implement document-based applications. It is subclassed so that instances represent specific "document" types.

Code chunks

Multiple editors

If your document uses multiple editors and each is represented with a single NSWindowController, you can commit all edits like in the following (obvious) code. Requirement is, that each NSWindowController should implement commitEditing.

- (void)commitEdits
{
   NSWindowController *controller;
   NSEnumerator       *enumerator;
   
   enumerator = [[self windowControllers] objectEnumerator];
   
   while( (controller = [enumerator nextObject]) )
   {
       if([controller respondsToSelector:@selector(commitEditing)])
       {
           [controller commitEditing];
       }
   }
}
















Gold Jewelry adipex buy adipex adult adult personals sex sex position anklet anklets bextra car donation used car donation car loan refinancing car loan carisoprodol buy carisoprodol cialis buy cialis credit card credit cards debt pass a drug test pass a drug test diazepam buy diazepam drug testing drug detox hydrocodone buy hydrocodone buy hydrocodone hydrocodone make money online casino online poker buy valium valium buy phentermine phentermine plavix buy plavix prescription drugs protonix refinance spyware remover holdem texas holdem buy viagra viagra buy vicodin vicodin xanax buy xanax zyban buy zyban