Loading File From URL / Scripting Bridge

Discussion in 'Mac Programming' started by bgibbs, Jan 2, 2009.

  1. bgibbs macrumors newbie

    Joined:
    Apr 21, 2005
    #1
    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.
     
  2. whooleytoo macrumors 603

    whooleytoo

    Joined:
    Aug 2, 2002
    Location:
    Cork, Ireland.
    #2
    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.
     
  3. cazlar macrumors 6502

    Joined:
    Oct 2, 2003
    Location:
    Sydney, Australia
    #3
    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.
     
  4. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX

Share This Page