Sunday, April 25, 2010

Creating a 'File Open' dialog box

Use the following class to open a window for a user to select a file


NSOpenPanel


Create the panel using the following:


NSOpenPanel *op = [NSOpenPanel openPanel];


This only instantiates the object.  There are several calls to make the dialog window show up on the screen.  I will list them here for completeness however the class reference from apple indicates that these calls were deprecated for OS X 10.6.  Dumb!...



* I used this one and it worked will.  I set file and types arguments to nil

No comments:

Post a Comment