I want to use NavPutFile in a Carbon port of an old program. I know
it's obsolete, but I don't want the hassle of dealing with FsRefs and
CFStrings etc, and I don't care about Long/Unicode filenames.
The program originally used CustomPutFile, with a popup menu to select
which of 9 different file types to create.
Now I can see how to populate the popup menu in NavPutFile, but what I
can't see is how to retrieve the user's choice of filetype after the OK
button has been pressed.
Can anyone enlighten me?
Phil Taylor
Phil Taylor - 23 Sep 2005 10:48 GMT
> Now I can see how to populate the popup menu in NavPutFile, but what I
> can't see is how to retrieve the user's choice of filetype after the OK
> button has been pressed.
To answer my own question (in case anybody's interested), it's done in
the eventproc. Look for a callBackSelector of type
kNavCBPopupMenuSelect. Then look at the what and when fields of the
eventrecord obtained from
callBackParms^.eventData.eventDataParms.event^. These contain the type
and creator OSTypes from the list which you supplied in the
popupExtension of NavDialogOptions.
Doncha just love Navigation Services?
Phil Taylor