Page 1 of 1

DONE: program faults with NSOpenPanel

PostPosted: Mon Jun 21, 2010 6:04 am
by udo.killermann
Bernd,

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

Re: program faults with NSOpenPanel

PostPosted: Mon Jun 21, 2010 8:44 am
by berndnoetscher
Udo,
your code is expected to work.
Unfortunetaly, you found a bug in the runtime. Will upload a new version with the fix soon.
Thanks.

Re: program faults with NSOpenPanel

PostPosted: Tue Jun 22, 2010 7:12 pm
by berndnoetscher
Just uploaded the fix.