Xcode Code Commenting Question

Discussion in 'Mac Apps and Mac App Store' started by Caspa, Jan 8, 2004.

  1. Caspa macrumors member

    Joined:
    Apr 11, 2003
    Location:
    Sydney
    #1
    Hi All,

    Quick question regarding Xcode.
    When I make new files it generates the usual:
    /*
    * untitled.h
    * Project
    *
    * Created by bla bla on Fri Jan 09 2004.
    * Copyright (c) 2004 __MyCompanyName__. All rights reserved.
    *
    */

    Anybody know how to set what it automatically generates, or at least set your company name? I've look everywhere in preferences, both in Xcode and Project builder.. anyone know?!

    thanks :)
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
  3. Caspa thread starter macrumors member

    Joined:
    Apr 11, 2003
    Location:
    Sydney
    #3
    grrr can't seem to get it to work..
    copy-pasted defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions {ORGANIZATIONNAME = "My Company's Name"; } into terminal (and tried it after su'ing) but gave me: -bash: syntax error near unexpected token `}'
    Am I doing something wrong? :confused:
     
  4. iElvis macrumors member

    Joined:
    Jan 30, 2003
    Location:
    Wellington, New Zealand
    #4
    I would love to know the answer to this too. I use xcode during school for my java class. I use my iBook while everyone else has to use the school comps (XP + Novell) including the teacher.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    I can't get this to work either! Try opening the file (~Library/Preferences/com.apple.Xcode) in the plist editor and add the definition there instead.
     
  6. cp21yos macrumors newbie

    Joined:
    Jan 11, 2002
    Location:
    Sydney
    #6
    If you company name has spaces like mine...

    you need to add single quotes:
    defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "Some Company Name"; }'
     
  7. Caspa thread starter macrumors member

    Joined:
    Apr 11, 2003
    Location:
    Sydney
    #7
    Re: If you company name has spaces like mine...

    Thanks heaps... worked! :)
     

Share This Page