Pasteboard issue

  • Hi all,

    I am having a strange problem with the Pasteboard for NSStringTypes. --

    Quick background on my app.

    I have a System Preference which controls whether or not to show my
    NSStatusItem.
    When my NSStatusItem is visible to the user, they have an option to
    copy a string in a text field to the pasteboard automatically.
    The NSStatusItem is background only application set with the
    LSUIElement in my NSStatusItem's info.plist.

    This is all working fine, however, when my status Item is not active,
    the string that is copied to the pasteboard goes away.
    In trouble shooting the problem I have narrowed the issue down to a
    call I am making from my System Pref to launch my Status Item:

    [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:
    [appBundle bundleIdentifier]
                                                            options:NSWorkspaceLaunchWithoutActivation
                                     additionalEventParamDescriptor:NULL
                                                     launchIdentifier:nil]

    For whatever reason when I launch my application with this call -
    during the normal use of the status item - the data copied to the
    pasteboard disappears when my status item is not active.

    If I use:

    [[NSWorkspace sharedWorkspace] launchApplication:appPath]

    Everything works fine.  The string data is copied to the pasteboard
    regardless of active status.

    Can anyone shed any light on this?

    Kam
previous month may 2007 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