The old way was [ MyPanel runModalForDirectory: thedir file: thefile ]
, and the panel would open in the specified directory with the specified file already selected.
That's deprecated; we're supposed to use runModal now, but I don't see any way to set the selected file name. I've tried including it in the string for setDirectoryURL, I've tried setRepresentedFilename, I've tried setNameFieldStringValue ... obviously it's possible to do this somehow, but I'm not having any luck with the internet search terms I've chosen, nor with Apple's documentation....
Thanks if you can help!