Plugin locks widget under Tiger

  • Hi, I'm hoping someone will be able to point me in the right direction
    - I've done a little bit of searching, but I don't really know what
    I'm looking for, the error probably simply comes from my very limited
    knowledge of cocoa (and the debugging tools I should be looking at)!!

    Anyway - I've written a plugin for a Dashboard Widget (my first proper
    bit of code) that simply opens a dialog window.  I wrote it in Xcode 3
    on Leopard and everything works fine, but I come to test it on Tiger
    and it fails.

    To open the window I use the line:
    [NSApp beginModalSessionForWindow:theDialogWindow];

    And after this line has executed, the widget itself no longer excepts
    keyboard entry.  The dialog window is fine and works and the widget
    seems ok as you can still flip it and press buttons, and it responses
    to callbacks from the plugin, but all key presses simply result in an
    error beep - incl cmd-r

    I'm really confused over what I might try to resolve this

    Any help would be fantastic, thanks

    Ben.
  • Did you do
        [theDialogWindow makeKeyAndOrderFront:NULL]
    before beginning the modal session?

    Ben Robinson wrote:
    > Hi, I'm hoping someone will be able to point me in the right direction
    > - I've done a little bit of searching, but I don't really know what
    > I'm looking for, the error probably simply comes from my very limited
    > knowledge of cocoa (and the debugging tools I should be looking at)!!
    >
    > Anyway - I've written a plugin for a Dashboard Widget (my first proper
    > bit of code) that simply opens a dialog window.  I wrote it in Xcode 3
    > on Leopard and everything works fine, but I come to test it on Tiger
    > and it fails.
    >
    > To open the window I use the line:
    > [NSApp beginModalSessionForWindow:theDialogWindow];
    >
    > And after this line has executed, the widget itself no longer excepts
    > keyboard entry.  The dialog window is fine and works and the widget
    > seems ok as you can still flip it and press buttons, and it responses
    > to callbacks from the plugin, but all key presses simply result in an
    > error beep - incl cmd-r
    >
    > I'm really confused over what I might try to resolve this
    >
    >
    > Any help would be fantastic, thanks
    >
    >
    > Ben.
  • Thanks for your help

    I didn't have that line, so I've added it - and it has made no
    difference?!

    The only thing I do before beginModalSessionForWindow is setup the
    window contents and size, and the nib is loaded when the plugin is
    loaded.

    I can share more of the code if it will help?

    Ben.

    On 1 Feb 2008, at 5:34, John Stiles wrote:

    > Did you do
    > [theDialogWindow makeKeyAndOrderFront:NULL]
    > before beginning the modal session?
    >
    >
    > Ben Robinson wrote:
    >> Hi, I'm hoping someone will be able to point me in the right
    >> direction - I've done a little bit of searching, but I don't really
    >> know what I'm looking for, the error probably simply comes from my
    >> very limited knowledge of cocoa (and the debugging tools I should
    >> be looking at)!!
    >>
    >> Anyway - I've written a plugin for a Dashboard Widget (my first
    >> proper bit of code) that simply opens a dialog window.  I wrote it
    >> in Xcode 3 on Leopard and everything works fine, but I come to test
    >> it on Tiger and it fails.
    >>
    >> To open the window I use the line:
    >> [NSApp beginModalSessionForWindow:theDialogWindow];
    >>
    >> And after this line has executed, the widget itself no longer
    >> excepts keyboard entry.  The dialog window is fine and works and
    >> the widget seems ok as you can still flip it and press buttons, and
    >> it responses to callbacks from the plugin, but all key presses
    >> simply result in an error beep - incl cmd-r
    >>
    >> I'm really confused over what I might try to resolve this
    >>
    >>
    >> Any help would be fantastic, thanks
    >>
    >>
    >> Ben.

previous month february 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    
Go to today