Re: about playing quicktime movies in Cocoa
Re: about playing quicktime movies in Cocoa
- Subject: Re: about playing quicktime movies in Cocoa
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 15 May 2002 22:52:56 -0700
On Wednesday, May 15, 2002, at 06:18 PM, Antonio Inojal wrote:
So far initWithURL is the best choice. But who wants to access a file
by a url?
Umm, I do. You will also find that the document architecture supports
opening documents from URLs, and saving documents to URLs -- provided in
the latter case that the URL is a file reference.
At least for such a simple task I don't want it.
It's one extra line of code, if you decide to break out the URL as a
temporary variable:
NSURL *movieUrl = [NSURL fileURLWithPath:filePath];
NSMovie *movie = [[NSMovie alloc] initWithURL:movieUrl byReference:NO];
or, of course:
NSMovie *movie = [[NSMovie alloc] initWithURL:
[NSURL fileURLWithPath:filePath] byReference:NO];
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.