I create a cocoa application, as we know it run a default window if we don't add any code. Now I want open a file dialog before the main window display.
ps. I open file dialog using method as the following:
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
if([openPanel runModalStyle:nil] == NSOKButton)
{
//deal the data in the opening file
}
But I couldn't put this code onto right place. Where should I put it in order to reach my aim?
ps. I open file dialog using method as the following:
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
if([openPanel runModalStyle:nil] == NSOKButton)
{
//deal the data in the opening file
}
But I couldn't put this code onto right place. Where should I put it in order to reach my aim?