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 <jam...@frameforge3d.com>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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com