On Oct 30, 2011, at 12:33 PM, Charles Srstka wrote:

> On Oct 30, 2011, at 12:05 PM, Martin Hewitson wrote:
> 
>> Dear list,
>> 
>> Has anyone given any thought as to how to use Versions with an editor app 
>> which manages files? Consider an app like Xcode. Is it conceivable to have 
>> Versions for Xcode? Of course you could have Versions for the Xcode project 
>> file, but what about the source code files? How would they be handled? I'm 
>> guessing that since Xcode doesn't implement Versions that the technology is 
>> not well suited for such an app. 
> 
> To follow up on my earlier post a bit, Xcode *does* support Versions, as 
> you’ll see if you play with it a bit. Make a change to a source file, don’t 
> save, let it sit for a few seconds, and then examine the source file with the 
> ‘more’ program in the Terminal, and you’ll see that your change has indeed 
> been autosaved. Also, if you open a source file or a .xib file in TextEdit, 
> you’ll be able to browse all the versions that have been created by Xcode. 
> The only thing missing in Xcode is an *interface* for Versions. Now, one 
> could argue that since Xcode has built-in support for git and svn, Versions 
> support isn’t necessary, and you’d probably be right. For a similar type of 
> application that doesn’t have built-in source control, though, it might be a 
> handy thing, and if it turns out there’s an API somewhere to get at the data 
> of a version, then you’d be able to do whatever you want. Unfortunately, I 
> haven’t been able to find any such API, but it’s possible I’ve missed 
> something, since searching for “Versions” is something that’s inherently 
> going to turn up a ton of false positives.

And, upon a little further inspection, although there’s no method to get to the 
data, there is the URL property on NSFileVersion, which you can read via the 
standard file-reading APIs to get the data and roll your own Versions 
interface. So, this should be very much possible.

Charles_______________________________________________

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

Reply via email to