View code of existing preference pane.

Discussion in 'Mac Programming' started by Submerged06, May 28, 2012.

  1. Submerged06 macrumors newbie

    May 28, 2010

    I'm a long-time web programmer, but I have no experience with Mac programming. However, I have a preference pane application that I'd like to see the source code of (just out of curiosity / to see a working example of code).

    I have xcode 4, and I know how to open the package and locate the executable under "MacOS" -- but when I open it in xcode, it just shows a picture of the black box with a green 'exec' in the upper-left corner.

    I don't need to copy, edit or compile the code, I'm just curious about it what it might look like :). I suppose it might just not be possible, which is lame but fair enough. Haha.

    Anyhow, any help would be great. This seems like a basic question, but I couldn't find anything on Google over an hour or two of searching.

    - Alex
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I don't have any experience with programming preference panes, but my guess would be that the source code used to create them would be compiled so you wouldn't be able to look at the source code without contacting the author and asking for it.

    The one thing you might be able to do is find a nib or xib in a resources file... if their interface was set up in there and they relied on cocoa bindings, you might be able to open that and do some tweaks, but I wouldn't really expect you to be able to do much.
  3. Submerged06 thread starter macrumors newbie

    May 28, 2010
    Ah, thanks for the information. There's a nib, but not much there to look at (just a list of random values and whatnot). I'll just look up some example code on Google and wet my interest a bit :). Thanks!
  4. Red Menace macrumors 6502

    Red Menace

    May 29, 2011
    Littleton, Colorado, USA
    The executable code is, well, the code that is directly executable by the processor, and is created by a compiler - it isn't a scripting/markup language or configuration file that is human readable (well, not readable by most, anyway). You aren't going to get much out of a nib file either since most are compiled these days, but they are just files that describe various parts of the user interface. If the prefpane project source files are not available, you can check out Apple's documentation and example project, or look at an open source project such as Perian.

Share This Page