Xcode's ability to take away the window focus form other applications

  • Hi,

    When in debugging mode within Xcode, when a breakpoint occurs, Xcode
    moves the focus/active window to Xcode again (no mater what application
    was focused before, like for example TextPad had the focus, while I was
    debugging something else, the focus is taken away from TextPad and the
    Xcode debug window gets it). Does anyone know how can I find out what
    Xcode does to achieve this?

    Thank you
    -Vance
  • Have a look at -[NSApplication activateIgnoringOtherApps:]

    Mike.

    On 23 Dec 2007, at 17:17, Vance wrote:

    > Hi,
    >
    > When in debugging mode within Xcode, when a breakpoint occurs, Xcode
    > moves the focus/active window to Xcode again (no mater what
    > application was focused before, like for example TextPad had the
    > focus, while I was debugging something else, the focus is taken away
    > from TextPad and the Xcode debug window gets it). Does anyone know
    > how can I find out what Xcode does to achieve this?
    >
    > Thank you
    > -Vance
  • Cool! Thank you Mike. That works great, but one problem, [NSApp
    deactivate] does not seem to work, after the focus is taken with [NSApp
    activateIgnoringOtherApps:YES], when the window is closed calling [NSApp
    deactivate] doesn't seem to restore the focus to the original
    application that had the focus before it was taken away with
    activateIgnoringOtherApps, and what happens is that the test app is
    still active.
    Thanks,
    Vance

    Mike Abdullah wrote:
    > Have a look at -[NSApplication activateIgnoringOtherApps:]
    >
    > Mike.
    >
    > On 23 Dec 2007, at 17:17, Vance wrote:
    >
    >> Hi,
    >>
    >> When in debugging mode within Xcode, when a breakpoint occurs, Xcode
    >> moves the focus/active window to Xcode again (no mater what
    >> application was focused before, like for example TextPad had the
    >> focus, while I was debugging something else, the focus is taken away
    >> from TextPad and the Xcode debug window gets it). Does anyone know
    >> how can I find out what Xcode does to achieve this?
    >>
    >> Thank you
    >> -Vance
    >
previous month december 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