objective c - Cocoa app crashes when trying to open a save dialog: Timeout occured while waiting for the window -


i wrote html5 app , i'm making wrapper in cocoa mac. i'm in process of writing method take url , let user save disk. here method far:

- (void) downloadfile: (nsstring *) url {      nssavepanel * savepanel = [nssavepanel savepanel];     [savepanel setallowedfiletypes: @[@"png"]];     [savepanel setnamefieldstringvalue:@"test"];     [savepanel beginwithcompletionhandler:^(nsinteger result){         //nsarray * files = [[opendlg urls] valueforkey: @"relativepath"];         //[resultlistener choosefilenames: files]  ;     }];     [savepanel runmodal];  } 

however when invoke method (long after window made) app crashes , error in console: 2013-07-21 18:23:05.067 reditr[31458:d11f] rvs:__54-[nsremotesavepanel _runorderingoperationwithcontext:]_block_invoke_0319 : timeout occured while waiting window

you don't want use both -runmodal , -beginwithcompletionhandler:. use 1 or other (preferably latter).


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -