I actually added that basePathForAliasFile: method just to avoid  
another temporary URL conversion in the save loop.

Which brings up another point.  NSDocument converted everything to use  
NSURL instead of paths in 10.4, but the rest of Cocoa seems to use  
paths (NSFileManager, the new NSWorkspace stuff for UTIs).  I  
complained to Apple about this and never heard back.

Given that, I'm not convinced that we should use NSURL as a path  
replacement.  It would be nice to pick one and stick with it, so we  
avoid the URL<->path conversions as much as possible.

What should we do?  The only good thing about URLs is that they're  
easy to convert to/from FSRefs, as far as I'm concerned.  However, you  
can't use a ~ in a URL, and paths are easier to work with for relative  
paths.

Currently we support paths or string URLs in BibItem, and that code  
drives me crazy (some uses paths, some uses NSURL, some returns URLs  
as -absoluteString...).

My present thinking is that we should

- use NSString paths in BibItem
- create the file objects with paths
- use NSURL for remote URL
- only allow a one-time upgrade of a current file (i.e. ditch the  
current path and URL handling setup)

That last point is likely to be unpopular.  I'm not sure if I like it  
myself, but the more legacy code we support, the harder it will be to  
make file objects work properly.

I originally used paths for FileView, but switched to URLs to allow  
representing non-file URLs.  This isn't a big deal, since returning a  
URL from a file object is easy, so doesn't need to drive any BD  
internal changes.


On Nov 11, 2007, at 9:32 AM, [EMAIL PROTECTED] wrote:

> Revision: 11541
>          http://bibdesk.svn.sourceforge.net/bibdesk/? 
> rev=11541&view=rev
> Author:   hofman
> Date:     2007-11-11 09:32:50 -0800 (Sun, 11 Nov 2007)
>
> Log Message:
> -----------
> We use a URL rather than a path.
>
> Modified Paths:
> --------------
>    branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m
>
> Modified: branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m
> ===================================================================
> --- branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m 2007-11-11  
> 17:29:34 UTC (rev 11540)
> +++ branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m 2007-11-11  
> 17:32:50 UTC (rev 11541)
> @@ -1684,7 +1684,7 @@
>         }
>     }
>     if (!drop) {
> -        value = [self filesAsBibTeXFragmentRelativeToPath:[self  
> basePathForAliasFile:nil]];
> +        value = [self filesAsBibTeXFragmentRelativeToPath:[[self  
> baseURLForAliasFile:nil] path]];
>         if (value) [s appendString:value];
>     }
>     [knownKeys release];
>
>
> This was sent by the SourceForge.net collaborative development  
> platform, the world's largest Open Source development site.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a  
> browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bibdesk-commit mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to