That's a good point.  I don't believe that it is.  I believe it's closer than 
it was before.   We should discuss this as I'm not sure if there are other 
considerations for determining the document type when dealing with a non-file 
URL.

 Gregory Casamento -- Principal Consultant - OLC, Inc 
# GNUstep Chief Maintainer




________________________________
From: Fred Kiefer <[email protected]>
To: Gregory Casamento <[email protected]>; GNUstep Developer 
<[email protected]>
Sent: Wednesday, April 8, 2009 3:18:15 AM
Subject: Re: [Gnustep-cvs] r28187 - in /libs/gui/trunk: ChangeLog 
Source/NSDocumentController.m

Gregory Casamento wrote:
> Author: gcasa
> Date: Wed Apr  8 04:24:27 2009
> New Revision: 28187
> 
> URL: http://svn.gna.org/viewcvs/gnustep?rev=28187&view=rev
> Log:
>     * Source/NSDocumentController.m: Return default type if the
>     URL is not a file URL and the call to typeFromFileExtension: returns
>     nil in typeForContentsOfURL:.
> 
> Modified:
>     libs/gui/trunk/ChangeLog
>     libs/gui/trunk/Source/NSDocumentController.m
> 

This change removed an important FIXME in that method:

- (NSString *) typeForContentsOfURL: (NSURL *)url error: (NSError **)err
{
   // FIXME: open connection and get response to determine mine/type
   // Should we only do this if [url isFileURL] is YES?     
   return [self typeFromFileExtension: [[url path] pathExtension]];
}

You code works a bit better in some cases, still the overall problem
that we need to determine the contents of an URL in a different way
isn't addressed.

I use FIXMEs in code to remind me of important open tasks, without the
FIXME the method now looks like we think it is complete. Do we?

Fred



      
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to