Edit Open/Save dialogs in interface builder?

Discussion in 'Mac Programming' started by alho0001, Jan 28, 2008.

  1. macrumors newbie

    Joined:
    Jan 28, 2008
    #1
    I can't find out how to edit the open/save dialog windows with interface builder... Does anyone knows how to do it? where is the .nib files?

    thanks /alex
     
  2. macrumors 6502

    Joined:
    Jun 1, 2006
    #2
    These are standard Cocoa dialogs, NSOpenPanel/NSSavePanel. You can change some of the options, but if you need something drastically different, you're going to have to create it yourself.
     
  3. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #3
    I dont really understand. Where can I edit these dialogs? In interface builder? How do I do that? Does every app have their own open/save dialog or is there one in the system to use with all apps?

    Thanks
     
  4. macrumors regular

    Joined:
    Sep 7, 2006
    #4
    Yes. In general for common interface, these dialogs are same for all apps. They encapsulate most of the common features. If you want something more, you will have to write your own dialog yourself. But for tasks like choosing a folder where you have to save your file IS same for everybody.

    What gets saved in that path is app specific which you code anyway.
     
  5. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #5
    How do I edit the "standard dialog"??? Where on my computer is this file?
     
  6. macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #6
    99% chance you can't. I doubt it's defined in a nib.
     
  7. macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #7
    Why do you keep asking the same question over and over again? For the fourth time, you cannot edit the standard dialogs. Cannot. Even if you ask again, you're not going to be able to. You can however add an accessory view to the standard save panel. See the -setAccessoryView: method of NSSavePanel for more info.

    Repeating one more time, you can not edit the standard open and save panels. They're not defined in NIB files, and in any case they're not editable. You can customize the save panel by adding an accessory view which may be enough to do what you want. If not, you have to create your own save/open panels from scratch.
     
  8. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #8
    ok ok sorry dudes, im a newbie on these kind of things. all i wanted was to ged rid of the very annoying "date modified" column. its very, very annoying.
     
  9. macrumors 6502

    Joined:
    Jun 1, 2006
    #9
    You're going to have to go custom if you want this.
     
  10. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #10
    Stop trying to edit system files. You can't edit them for other users, only yourself, so it won't do much good. The one thing about Mac OS X is it has a consistent interface, unlike Windows. If you go around messing with that users will not like it.
     
  11. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #11
    Now I've found the appkit.framwork folder on my computer. dont tell me that there's no way to edit the open / save dialogs, there MUST be a file inside this framework that contains information about how these dialogs are displayed.
    What I want to to is to remove the column headers in the open / save dialogs "list view". Dont ask me why, please just tell me which file that contains the information that i want to edit.

    If someone is getting annoyed because I keep asking over and over again, Im sorry, but please, keep it to yourselves.

    Thanks

    Alex
     
  12. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #12
    There is not necessarily an editable file: many parts of the OS level system are not contained in nib files at all: they are generated in code.
     
  13. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #13
    But can I edit the code with xcode? There must be a way to do that
     
  14. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #14
    No, you don't have the source code. You only have the compiled output. If this is what Apple have done you are out of luck.

    Edit to add: just to confirm: it's likely that the Open/Save dialogs are provided by the CommonCocoaPanels.bundle bundle in /System/Library/CoreServices. That bundle has no resources at all: just a single large compiled binary that is responsible for creating the common panels entirely in code without a nib file.
     
  15. macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #15
    Wow. Just wow. We told you this at the very beginning and here you are still asking the same (now) stupid question. You can't edit the system dialogs. Stop trying. It's a dumb idea to get rid of the Date Modified column anyway, but if you really must, you're going to have to create your own open and/or save dialog.

    Just because you say there "must be a way" does not make it so. There is not a way. Stop asking.
     
  16. thread starter macrumors newbie

    Joined:
    Jan 28, 2008
    #16
    Ok now I understand. thanks for explaining to me what all the other people couldn't explain.
     
  17. macrumors 6502

    Joined:
    Jun 1, 2006
    #17
    Many people including myself DID explain just this to you - you were just incapable of understanding without belaboring the point to death. As is the case with many if not all standard classes available in proprietary environments, you don't have the source code so you can only modify and change them to the extent that they allow.

    Edit:

    If you're going to try and implement them yourself, download GNUstep and get the sources from there. They are called NSOpenPanel.m and NSSavePanel.m respectively.
     

Share This Page