gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep Code Freeze


From: Wolfgang Lux
Subject: Re: GNUstep Code Freeze
Date: Wed, 1 Feb 2012 10:12:46 +0100

Fred Kiefer wrote:

> There hasn't been a gui release in almost a year and now seems as good a time 
> as ever. Feel free to report any bugs you find on the mailing list or even 
> better in the bug tracker on Savannah.

Sorry for being late here. I noticed a bug with the implementation of the 10.5+ 
NSWorkspace methods -filenameExtension:isValidForType:, 
-preferredFilenameExtensionForType:, and -typeOfFile:error:. These methods are 
supposed to work with UTIs as file types, but the current implementation uses 
filename extensions instead of them, which certainly is wrong. I'm not so sure 
about the correct fix, however. I think since we don't support UTIs at present, 
the best is simply to go down the error path everywhere, i.e.,

- (BOOL) filenameExtension: (NSString *)filenameExtension 
            isValidForType: (NSString*)typeName
{
  // FIXME
  // We don't support UTIs yet => can't determine whether extension is valid
  return NO;
}

- (NSString *) preferredFilenameExtensionForType: (NSString *)typeName
{
  // FIXME
  // We don't support UTIs yet => can't determine the preferred extension
  return nil;
}

- (NSString *) typeOfFile: (NSString *)absoluteFilePath error: (NSError 
**)outError
{
  // FIXME
  // We don't support UTIs yet => can't determine the file's type
  if (outError)
    {
      *outError = nil;
    }
  return nil;
}

This certainly gives less meaningful results than the current implementation, 
but prevents confusing document types and file extensions in the next release, 
which probably will stay around for a while :-)

Wolfgang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]