• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quickest Way to Open an NSTextAttachment in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: -[NSSet initWithSet:copyItems:] crashing
  • Next by Date: Re: Outlets not allowing direct access...
  • Previous by thread: Re: Quickest Way to Open an NSTextAttachment in NSTextView
  • Next by thread: connecting custom formatter to tableView column
  • Index(es):
    • Date
    • Thread