Now i can play with this simple method, but there is a mistake,
because the Path Control path send an NSUrl object to the QC, and i
cannot handle this yet.
To get a path that you can pass to the composition, just use NSURL's
method -path like this:
NSString *pathToMovie = [urlToMovie path];
I don't know your application, but in most cases, the user won't be
interested in the movie's path, but just in playing the movie. Maybe
it's better to subclass QCView and handle a drop in your custom class
that accepts movie files. Of course, this is a bit more advanced.
You'd need to implement three mothods in your QCView subclass:
1) In -awakeFromNib you should call:
[self registerForDraggedTypes:[NSArray
arrayWithObject:NSFilenamesPboardType]];
2) - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
Here you check whether the drag is only one file and if it is a movie
file.
3) - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
Here you accept the drop, take the dropped path and pass it to the
composition.
For more information, check out the Drag and Drop Programming Topics
for Cocoa:
http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html
Especially the Dragging File Paths section:
http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/Tasks/DraggingFiles.html#/
/apple_ref/doc/uid/20001288-101258-CJBFCHFA _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]