Re: Quickest Way to Open an NSTextAttachment in NSTextView
Re: Quickest Way to Open an NSTextAttachment in NSTextView
- Subject: Re: Quickest Way to Open an NSTextAttachment in NSTextView
- From: Heinrich Giesen <email@hidden>
- Date: Sat, 5 Mar 2005 18:34:36 +0100
On 05.03.2005, at 16:14, Kirt Cathey wrote:
But, getting back to the question of booting a file w/o having to write it
to the hard disk first........
The usual way to correspond with the NSWorkspace is via files.
As far as I understand your codesnippet you need the file only
temporaryly. For these situations there is a typical
UNIX style feature. Replace :
NSFileManager *projectFile = [NSFileManager defaultManager];
NSMutableString *myPath = [[NSMutableString alloc]
initWithString:NSHomeDirectory()];
[myPath appendString:@"/WPData/temp/"];
[myPath appendString:[myFileWrapper preferredFilename]];
[projectFile createFileAtPath:myPath
contents:myData
attributes:nil];
with:
[myData writeToFile:
[NSTemporaryDirectory() stringByAppendingPathComponent:[myFileWrapper preferredFilename]
atomically:YES] ];
--
Heinrich Giesen
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden