Edit Window in Document Based Application

Discussion in 'Mac Programming' started by Blakeasd, Sep 10, 2010.

  1. macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    This is my first time making a document application and I am trying to set it so all the windows have an orange background. Here is my code:

    Code:
     [window setBackgroundColor:[NSColor orangeColor]]; 
    I get an error saying 'window' is undeclared. By the way I am putting this code in the Xcode generated MyDocument.m file. My question is how is the default window it gives you declared(the one that says your document contents here)? I know in a regular Cocoa application it is declared as window. What is it called in a document based application? Or how do I change the background of it programmatically?
     
  2. macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2
    Document-based apps have more than one window; you'll need to access them via the window controllers for your documents.
     

Share This Page