[futurebasic] Re: [FB] Re: Custom Icon, re-Do

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Tue, 22 Jun 2004 22:24:55 -0400
On Tuesday, June 22, 2004, at 09:06  PM, michael evans wrote:

> Robert:
>
> The following does a great job of forcing the finder to update a 
> folders
> contents. This might help because if you are doing everything right 
> then the
> finder is not updating fast enough... I believe this fn to be an rp
> creation....
>

Not sure that my definition for the missing tlbox fn  FNNotify is 
correct, but if it is, no change. This is a bit maddening.

After a Restart, the icon is correct, but it's like Quicktime's voodoo 
tracking on a port that used to go on sometimes, the old just follows 
you around otherwise, if you don't.

I must be missing something, bad param, bad approach...

I set the custom icon flag when I write a file. After changing it, I 
flip it back, then reset it (not sure if that is needed) and also set 
the re-init flag in the finder flags. All the information is right as 
far as the icons and icns, but it's a no show in the finder, the old 
reigns supreme until a restart.

r
c

> /*
> Notify the Finder (and any other interested parties) that the content
> of this file's parent folder has changed,  The fileSpec passed should
> normally refer to a file that you have created, deleted or renamed.
> */
> local fn NotifyChangesInParentFolder( fileSpec as ^FSSpec )
> '~'1
> dim as FSSpec    parentFolderSpec
> dim as OSStatus  err
> dim as FSRef     parentFolderFSRef
>
> err = fn FSMakeFSSpec( fileSpec.vRefNum, fileSpec.parID, "",
> @parentFolderSpec )
> if ( err == _noErr ) then err = fn FSpMakeFSRef( parentFolderSpec,
> @parentFolderFSRef )
> if ( err == _noErr ) then err = fn FNNotify( parentFolderFSRef,
> _kFNDirectoryModifiedMessage, 0 )
> end fn = err