when I try to set filetypes using the Types property NSOpenPanel will throw an exception. Have a look at this code, what do I do wrong?
- Code: Select all
Dim myArr As Array
Event AwakeFromNib()
myArr.Append("icns")
myArr.Append("h")
Alert(myArr)
NSOpenPanel.Directory = "~/Downloads"
' NSOpenPanel.CanChooseDirectories = Yes
NSOpenPanel.Types=myArr
NSOpenPanel.Run()
Alert(FilePath(NSOpenPanel.FileName()))
Alert(NSOpenPanel.FileName())
End Event
This results in
- Code: Select all
-[NSCFString count]: unrecognized selector sent to instance 0x105a0e0
Regards
Udo