Friday, 15 May 2015

cocoa - NSOpenPanel runModalforTypes -



cocoa - NSOpenPanel runModalforTypes -

i got code book core animation zarra/long. not compile due next error: "'runmodalfortypes' deprecated"

- (ibaction)setmovielocation:(id)sender { nsopenpanel *openpanel; openpanel = [nsopenpanel openpanel]; [openpanel setcanchoosedirectories: no]; [openpanel setallowsmultipleselection: no]; [openpanel setresolvesaliases: no]; [openpanel setcanchoosefiles: no]; if ([openpanel runmodalfortypes:nil] == nsokbutton) { [[qclayer setvalue:openpanel filename] forinputkey:[@"movie_location" ;]] } }

is there possible prepare ?

as nsopenpanel inherits nssavepanel, you'll find method suited:

if ([openpanel runmodal] == nsokbutton)

see documentation nssavepanel , nsopenpanel

cocoa nsopenpanel

No comments:

Post a Comment