Object is nil

Mac OSX specific forum
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Object is nil

Post 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? :D
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Object is nil

Post 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)
Windows (x64)
Raspberry Pi OS (Arm64)
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Re: Object is nil

Post by spacebuddy »

Thanks Wilbert. :D
Post Reply