This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
You stuff the dirID you want to show into the lo-mem global
CurDirStore, and the NEGATIVE of the vRefNum you want into the lo-mem
If you are using CustomGetFile and return sfSelectionChanged from an
"init" message handler, you must remember to clear the script code, else
the selection will not change.