Page 1 of 1
Object is nil
Posted: Sun Oct 12, 2014 6:10 pm
by spacebuddy
I keep getting this error when I use this code
CocoaMessage(0,0,"noteNewRecentDocumentURL:",@filename)
Object is nil... Anyone see what is wrong?

Re: Object is nil
Posted: Sun Oct 12, 2014 8:41 pm
by wilbert
I haven't actually tried if it does something but I think you need something like this
Code: Select all
FileName.s = "test"
DocumentController = CocoaMessage(0, 0, "NSDocumentController sharedDocumentController")
URL = CocoaMessage(0, 0, "NSURL fileURLWithPath:$", @FileName)
CocoaMessage(0, DocumentController, "noteNewRecentDocumentURL:", URL)
Re: Object is nil
Posted: Mon Oct 13, 2014 4:35 am
by spacebuddy
Thanks Wilbert.
