home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ucselx!crash!alen
- From: alen@crash.cts.com (Alen Shapiro)
- Subject: Getting the alias'd name from a drag-and-drop app?
- Date: 27 Aug 92 15:22:05 GMT
- Message-ID: <alen.714928925@crash>
- Summary: Need to know fast how to do this
- Keywords: alias drag drop help
- Lines: 41
-
- Sorry to pester with this one, I know the info is in IMvol6 but
- the soonest I can get one of those (from the 4 bookstores I've
- tried here in San Diego is 6 weeks!!).
-
- I need to take a selection of aliases from a folder and drag them onto
- an application (that I am writing). The app must replace each aliased
- files with a copy of the real file that the alias represents. I have
- everything working EXCEPT one small thing. I can't discover the name/
- location of the alias files that are dropped onto the app.
-
- I'm using:
-
- CountAppFiles(&msg, &count);
-
- for(i=1 ; i <= count ; i++) {
- GetAppFiles((short)i, &thefile);
-
- if((err=FSMakeFSSpec(thefile.vRefNum, (long)NULL, thefile.fName, &spec)) != noErr) {
- fprintf(stderr, "FSMakeFSSpec error %hd\n", err);
- exit(err);
- }
-
- then a call to
- NewAliasMinimal to get a handle to the alias
- then a call to GetAliasInfo to find the name of the
- aliasing file
- }
-
- Trouble is, by the time GetAppFiles sees the parmlist it seems to
- contain references to dereferenced alias files.
-
- Is there a toolbox call that I should use instead of GetAppFiles
- that will stop it chaining down the alias chain and will cause
- it to deliver me the name and vRefNum of the alias itself?
-
- --alen
- alen@crash.cts.com
-
- ps I've put in an order for vol6 of IM but I'd like to continue
- to work meanwhile!!
-
-