Any frameworks for Leopard's Spaces?

  • How can I make my app know about when a space has changed, and when it has done so to which space it has changed? Also, how can I read which Spaces and how many are currently available? I'm allowed to use Snow Leopard.

    The only thing I'm aware of is the NSWorkspaceActiveSpaceDidChangeNotification in NSWorkspace, but that only tells me that a space changed, but doesn't provide me with any more information.

    Any ideas? I suppose the developer of Hyperspaces.app would know about this, but I guessed that he wouldn't want to tell me about his trade secrets :) Not that I'm gonna develop a competing product, just need to do some in-house stuff that allows for different keyboard layouts for differents spaces, but anyway, better to ask here I think.
    _________________________________________________________________
    Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
    The NSWorkspace notification is the only public API for this. Relatedly, you
    should not use private APIs which will restrict Apple's ability to change
    the internal implementation easily in the future, and make innovations or
    improvements difficult on them.

    -Steven

    2010/4/5 Ulai Beekam <ulaibeekam...>

    >
    > How can I make my app know about when a space has changed, and when it has
    > done so to which space it has changed? Also, how can I read which Spaces and
    > how many are currently available? I'm allowed to use Snow Leopard.
    >
    > The only thing I'm aware of is the
    > NSWorkspaceActiveSpaceDidChangeNotification in NSWorkspace, but that only
    > tells me that a space changed, but doesn't provide me with any more
    > information.
    >
    > Any ideas? I suppose the developer of Hyperspaces.app would know about
    > this, but I guessed that he wouldn't want to tell me about his trade secrets
    > :) Not that I'm gonna develop a competing product, just need to do some
    > in-house stuff that allows for different keyboard layouts for differents
    > spaces, but anyway, better to ask here I think.
    > _________________________________________________________________
    > Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
    >
    > http://www.thoughtfultree.com/
    http://www.degutis.org/
  • I don't mind using private API for this. After all my goal is to make some simple in-house app and it doesn't matter too much if it breaks after some OS X update.

    I am aware the private API discussion is forbidden here. Thus, if anyone can point me in the right direction, I would appreciate it if he or she can send me an off-list message about it.

    Thanks in advance, U.

    ---------------------
    The NSWorkspace notification is the only public API for this. Relatedly, you should not use private APIs which will restrict Apple's ability to change the internal implementation easily in the future, and make innovations or improvements difficult on them.

    -Steven


    _________________________________________________________________
    Hotmail: Trusted email with powerful SPAM protection.
    previous month april 2010 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    
    Go to today