Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nav Services default location problems



On 7/25/04 1:01 PM, Bob Sabiston didst favor us with:

> Hello again,
> So, I'm trying to manually set the default location of my load/save
> dialogs now. I'm using the method described in Technical Q&A QA1151:
>
> http://developer.apple.com/qa/qa2001/qa1151.html
>
> I am getting a parameter error -50 from the call to NavCustomControl:
>
> switch( callBackSelector )
> {
> case kNavCBStart:
> {
> OSStatus theStatus = noErr;
> theStatus = NavCustomControl(callBackParms->context,
> kNavCtlSetLocation, (void*)&defaultlocation);
> if (theStatus != noErr) RedAlertNum("\pproblem with
> NavCustomControlCall",theStatus);
> }
> break;
>
> In my app defaultlocation is defined as
>
> AEDesc defaultlocation;
>
> I set the value of this default location when I load a file. I've
> tried setting it to both a FSSpec and FSRef,
> and both types still give me the error.
>
> err = AECreateDesc(typeFSRef, &newFSRef, sizeof(FSRef),
> &defaultlocation);
>
> The AEDesc seems to me to be valid. What could be causing the error?
>
Are you using the FSRef of the file's parent directory or the file itself? I
do the same thing you do here and it works fine. If you're passing a file,
that would probably give you an error since you're supposed to be setting
the location to a directory.

Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Nav Services default location problems (From: Bob Sabiston <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.