osx - How to create a new instance of an NSDocument with NSDocumentController? -


i tried

[[nsdocumentcontroller shareddocumentcontroller] duplicatedocumentwithcontentsofurl:nil                                                                             copying:no                                                                         displayname:nil                                                                               error:null] ; 

but not working. have error

typeforcontentsofurl:error: must overridden application support non-'file:' urls. 

did try below:-

   [[nsdocumentcontroller shareddocumentcontroller]newdocument:self]; 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -