Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bgibbs

macrumors newbie
Original poster
Apr 21, 2005
5
0
Hi,

I'm trying to create a humble app to organize DVDs and launch them in Apple's DVD Player.app using Scripting Bridge. I can control a movie once it's playing, but I keep getting an error when trying to load a disc using a URL:

Apple event returned an error. Event = 'dvdx'\'odvf'{ '----':'utxt'("file://localhost/Volumes/Movies/FullDisc/High%20Fidelity/VIDEO_TS") }
Error info = {
ErrorNumber = -1700;
}


The explanation for ErrorNumber -1700 reads:

Data could not be coerced to the requested descriptor type

This happens whether or not I include the VIDEO_TS at the end.

In the DVDPlayer.h header, the openDvdVideoFolder: says it takes an NSURL as a parameter, which is what I'm passing it, so, I don't understand the error message. Any ideas?

Thanks.
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
I'm completely unfamiliar with scripting, so this could be way off; but are you using the right kind of NSURL? (i.e. did you create the NSURL using one of the "URLWithString" methods, or "fileURLWithPath" methods?)

I've found some classes/methods are fussy about which they receive.
 

cazlar

macrumors 6502
Oct 2, 2003
492
11
Sydney, Australia
Yeah, I think whooleytoo is on the right track.

Something like:
"file://localhost/Volumes/Movies/FullDisc/High%20Fidelity/VIDEO_TS" is defined as a path, not a NSURL.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.