Downloading Files with WebKit

Discussion in 'Mac Programming' started by ldenman, Apr 1, 2006.

  1. macrumors regular

    Joined:
    Jul 20, 2005
    #1
    I'm working on a cocoa project in xcode and have implemented a small browser. Does anyone know how to enable downloads?
    I'm obviously using the WebKit framework...
     
  2. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #2
    If you're using webkit there's nothing special you need to do to enable downloads. How've you got it set up?
     
  3. thread starter macrumors regular

    Joined:
    Jul 20, 2005
    #3
  4. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #4
    And? What's the problem? Should work fine.

    Firstly check all your connections in interface builder.
     
  5. thread starter macrumors regular

    Joined:
    Jul 20, 2005
    #5
    i click a file to download and nothing happens..thats the problem.
     
  6. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #6
    So the browsing webpages part of it is working just not the downloading of files?
     
  7. thread starter macrumors regular

    Joined:
    Jul 20, 2005
    #7
    exactly.
    thanks for taking time to help me out.
     
  8. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #8
    Have you tried using spotlight to see if the files are being download anywhere on your disk (rather than where you expect them to go)? If you can't find them then the best bet is to check out the documentation. webViews and webFrames have a ton of optional helper objects (delegates , dataSources etc) and maybe one of those is what you want.

    I've used webKit in one of my apps in several places but I generally use it to display content my app creates on the fly internally. I've never actually had to worry about where files got downloaded to.
     
  9. thread starter macrumors regular

    Joined:
    Jul 20, 2005
    #9
    ...nothing...
     
  10. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #10
    There are a couple of examples in the Developer tools that might help you in /Developer/Examples/Webkit.

    The 'Downloader' example specifically deals with downloading files but doesn't use a webview. The Minibrowser example is just that.
     
  11. thread starter macrumors regular

    Joined:
    Jul 20, 2005
    #11
    WOW! Thats exactly what I need...i'll check into it and see if i can work something out. Thanks.
     

Share This Page