NSServices and NSPasteboard

  • Hi,

    Using NSServices, I'm not receiving data for the PBoard types
    expected.  For example, I would expect to get NSHTMLPBoardType from
    Safari if I select the entire page.  I would expect to get
    NSRTFDPBoardType from TextEdit if I select the entire contents of an
    rtfd document.  I receive neither.  In fact, under Leopard, I don't
    see anything useful in the pasteboard.  There is a pasteboard type
    "dyn.agu8y63....." which shows up whether I have selected rtfd text
    or html text.  It appears to be a dynamic UTI, but the data it
    references also seems to be plain text.

    At least, under Tiger there were some flavors I could use to get all
    the data.  Is the Carbon Pasteboard Manager any better?  I thought
    Apple was discouraging Carbon use.

    Any insight would be greatly appreciated,
    Denise
  • On 20/01/08 5:08 PM, "Denise Eatherly" <denise...> wrote:

    > Hi,
    >
    > Using NSServices, I'm not receiving data for the PBoard types
    > expected.  For example, I would expect to get NSHTMLPBoardType from
    > Safari if I select the entire page.  I would expect to get
    > NSRTFDPBoardType from TextEdit if I select the entire contents of an
    > rtfd document.  I receive neither.  In fact, under Leopard, I don't
    > see anything useful in the pasteboard.  There is a pasteboard type
    > "dyn.agu8y63....." which shows up whether I have selected rtfd text
    > or html text.  It appears to be a dynamic UTI, but the data it
    > references also seems to be plain text.
    >
    > At least, under Tiger there were some flavors I could use to get all
    > the data.  Is the Carbon Pasteboard Manager any better?  I thought
    > Apple was discouraging Carbon use.
    >
    > Any insight would be greatly appreciated,
    > Denise
    >

    It sounds to me like you're running into the bug described here:

    <http://www.rainmakerinc.com/kb/index.php?article=87>

    (scroll down to the second known issue regarding services and multiple
    pasteboard formats)

    This has been filed as <rdar://5572825>, couldn't hurt if you filed a
    duplicate!

    NOW, as for expecting to get NSHTMLPBoardType, well, don't. I've never
    encountered an app that puts it on either the general or services
    pasteboard. I have never seen documentation describing NSHTMLPBoardType (I
    wouldn't assume it's straight-up HTML, either). I'd sure be happy to witness
    its actual existence! Anyone?

    Hope that helps,
    Evan Gross

    --
    Evan Gross, President, Rainmaker Research Inc.
    Developers of Macintosh and Windows Software
    Spell Catcher for Mac OS and Windows
    http://www.rainmakerinc.com/
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