NSImage initWithPasteboard:

  • N00b question:
    If I copy or drag an image file from the (Mac OS X 10.4.11) Finder,
    the Finder puts the filename and URL and icon on the pasteboard.  If
    I use initWithPasteboard in my application, it uses the icon instead
    of loading the contents of the file.  What's the best way to work
    around this?
    Thanks,
    John
  • (also noob question:)
    If the pasteboard contains the filename and URL shouldn't it
    be possible to use -initWithContentsOfFile: or -initWithContentsOfURL:
    to initialize your image?

    marc

    John Dalbec schrieb:
    > N00b question:
    > If I copy or drag an image file from the (Mac OS X 10.4.11) Finder,
    > the Finder puts the filename and URL and icon on the pasteboard.  If
    > I use initWithPasteboard in my application, it uses the icon instead
    > of loading the contents of the file.  What's the best way to work
    > around this?
    > Thanks,
    > John
    >

    --
    ---------------------------------------------------
    Dr. Marc Lohse
    Max-Planck-Institute of molecular Plant Physiology
    Dept. Bock
    Am Muehlenberg 1
    14476 Potsdam-Golm

    Tel.    : 0331-5678-313
    e-mail  : <lohse...>
    ---------------------------------------------------
  • Read the documentation for NSPasteboard and you'll understand that
    it's possible to put something on the pasteboard that has multiple
    associated data types.

    --Kyle Sluder
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today