Wie ändere ich im NSOpenPanel "Öffnen" auf "Auswählen"?

In meiner Anwendung, die ich brauche, um zu zeigen, das wählen Sie Datei-dialog,
Ich bin in der Benutzung des NSOpenPanel die es erlaubt, wählen Sie die Datei, die code, wie unten gezeigt,

- (IBAction)sendFileButtonAction:(id)sender{

    NSOpenPanel* openDlg = [NSOpenPanel openPanel];

    //Enable the selection of files in the dialog.
    [openDlg setCanChooseFiles:YES];

    //Enable the selection of directories in the dialog.
    [openDlg setCanChooseDirectories:YES];

    //Display the dialog.  If the OK button was pressed,
    //process the files.
    if ( [openDlg runModalForDirectory:nil file:nil] == NSOKButton )
    {
        //Get an array containing the full filenames of all
        //files and directories selected.
        NSArray* files = [openDlg filenames];

        //Loop through all the files and process them.
        for( int i = 0; i < [files count]; i++ )
        {
            NSString* fileName = [files objectAtIndex:i];
            [self log:fileName];

            //Do something with the filename.
        }
    }

}

alles funktioniert perfekt, aber ich bin mit nur einem Problem, während Sie die Datei öffnen, es zeigt das Öffnen und Abbrechen-button,
Gibt es eine Möglichkeit, benennen Sie die open-Taste, um "Select" - Taste, oder brauche ich eine andere Kakao-Ressource.

InformationsquelleAutor der Frage Amitg2k12 | 2011-04-11

Schreibe einen Kommentar