• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder refresh issue in Mac OS 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder refresh issue in Mac OS 10.5


  • Subject: Re: Finder refresh issue in Mac OS 10.5
  • From: Sachin Porwal <email@hidden>
  • Date: Thu, 13 May 2010 22:28:41 +0530

Hi James,

Thanks for your help provided. I tried to use the function provided, but it
didn't help much. The symbolic link is not getting refreshed & still shows
the broken target path. I noticed that if i browse the complete target path
in finder before launching the .app thru symlink, it works fine.

Thanks,
Sachin

On Tue, May 11, 2010 at 10:52 PM, James Walker <email@hidden>wrote:

> On 5/10/2010 7:36 AM, Sachin Porwal wrote:
>
>  I also tried using noteFileSystemChanged after creating the shortcut :
>>
>
> Try sending a kAESync event to the Finder.  Here's my code to do it. Note
> that although this is Carbon code, it will compile for the x86_64
> architecture.  Use CFURLGetFSRef to go from an NSURL* to an FSRef.
>
> #import <Carbon/Carbon.h>
>
> /*!
>    @function   SendFinderSyncEvent
>
>    @abstract   Send an Apple event to the Finder to update the display
>                        of the item specified.
>
>    @param      inObjectRef     A reference to a file or folder.
>
>    @result     An OS error code.
> */
> OSStatus    SendFinderSyncEvent( const FSRef* inObjectRef )
> {
>    AppleEvent  theEvent = { typeNull, NULL };
>    AppleEvent  replyEvent = { typeNull, NULL };
>    AliasHandle itemAlias = NULL;
>    const OSType    kFinderSig = 'MACS';
>
>    OSStatus    err = FSNewAliasMinimal( inObjectRef, &itemAlias );
>    if (err == noErr)
>    {
>        err = AEBuildAppleEvent( kAEFinderSuite, kAESync,
>                typeApplSignature, &kFinderSig, sizeof(OSType),
>                kAutoGenerateReturnID,  kAnyTransactionID, &theEvent,
>                NULL, "'----':alis(@@)", itemAlias );
>
>        if (err == noErr)
>        {
>            err = AESendMessage( &theEvent, &replyEvent, kAENoReply,
>                kAEDefaultTimeout );
>
>            AEDisposeDesc( &replyEvent );
>            AEDisposeDesc( &theEvent );
>        }
>
>        DisposeHandle( (Handle)itemAlias );
>    }
>
>    return err;
> }
>
> --
>  James W. Walker, Innoventive Software LLC
>  <http://www.frameforge3d.com/>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Finder refresh issue in Mac OS 10.5 (From: Sachin Porwal <email@hidden>)
 >Re: Finder refresh issue in Mac OS 10.5 (From: James Walker <email@hidden>)

  • Prev by Date: Re: Xcode 3.2 - Missing iPhoneOS 2.2.1
  • Next by Date: Filling a drawer (Core Data and a newbie problem)
  • Previous by thread: Re: Finder refresh issue in Mac OS 10.5
  • Next by thread: CCHmacInit - key?
  • Index(es):
    • Date
    • Thread