PDA

View Full Version : Edit Open/Save dialogs in interface builder?




alho0001
Jan 28, 2008, 07:42 PM
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



antibact1
Jan 28, 2008, 07:55 PM
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.

alho0001
Feb 1, 2008, 03:24 PM
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.

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

acidity
Feb 1, 2008, 03:32 PM
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.

alho0001
Feb 1, 2008, 03:38 PM
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.

How do I edit the "standard dialog"??? Where on my computer is this file?

Catfish_Man
Feb 1, 2008, 04:38 PM
How do I edit the "standard dialog"??? Where on my computer is this file?

99% chance you can't. I doubt it's defined in a nib.

mduser63
Feb 1, 2008, 11:15 PM
How do I edit the "standard dialog"??? Where on my computer is this file?

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.

alho0001
Feb 3, 2008, 09:56 AM
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.

antibact1
Feb 4, 2008, 08:57 AM
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.

You're going to have to go custom if you want this.

kainjow
Feb 4, 2008, 11:58 AM
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.

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.

alho0001
Feb 6, 2008, 07:57 AM
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

robbieduncan
Feb 6, 2008, 08:04 AM
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.

alho0001
Feb 6, 2008, 04:22 PM
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.

But can I edit the code with xcode? There must be a way to do that

robbieduncan
Feb 6, 2008, 04:35 PM
But can I edit the code with xcode? There must be a way to do that

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.

mduser63
Feb 6, 2008, 07:31 PM
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.

alho0001
Feb 8, 2008, 09:26 AM
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.

Ok now I understand. thanks for explaining to me what all the other people couldn't explain.

antibact1
Feb 8, 2008, 12:20 PM
Ok now I understand. thanks for explaining to me what all the other people couldn't explain.

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.