Window close button issue in Leopard

  • Greetings!

    We have encountered an issue with  window "close" button. In our
    application, we are disabling the close button, as we are writing
    data to an output device.

    We are showing an authentication dialog, which is put just before
    writing the data (using AuthorizationCopyRights).

      In Leopard, soon after the display of the authentication dialog,
    the "close" button gets enabled. Even if we try to disable this
    button (after disposing the authentication dialog), the button remain
    enabled. (using [[AppWindow standardWindowButton:NSWindowCloseButton]
    setEnabled:NO];). This problem do on occur in Tiger and below OS.

    Can anyone please let me know, if we need to set any other flags to
    disable the window "close" button in Leopard.

    Thanks in advance.

    Best Wishes
    Veena

    -----------------------------------------------
    Robosoft Technologies - Come home to Technology

    Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
  • I don't know the real answer to your problem, but as a workaround, you
    can try adding a delegate and implementing -windowShouldClose: to return
    NO. If that doesn't work, subclass NSWindow and override -close to do
    whatever you need (of course, calling through to [super close] if you
    want to allow closing).

    Good luck!

    Veena Mayya wrote:
    > Greetings!
    >
    > We have encountered an issue with  window "close" button. In our
    > application, we are disabling the close button, as we are writing data
    > to an output device.
    >
    > We are showing an authentication dialog, which is put just before
    > writing the data (using AuthorizationCopyRights).
    >
    > In Leopard, soon after the display of the authentication dialog, the
    > "close" button gets enabled. Even if we try to disable this button
    > (after disposing the authentication dialog), the button remain
    > enabled. (using [[AppWindow
    > standardWindowButton:NSWindowCloseButton]setEnabled:NO];). This
    > problem do on occur in Tiger and below OS.
    >
    > Can anyone please let me know, if we need to set any other flags to
    > disable the window "close" button in Leopard.
    >
    > Thanks in advance.
    >
    > Best Wishes
    > Veena
    >
    >
    >
    >
    > -----------------------------------------------
    > Robosoft Technologies - Come home to Technology
    >
    > Disclaimer: This email may contain confidential material. If you were
    > not an intended recipient, please notify the sender and delete all
    > copies. Emails to and from our network may be logged and monitored.
    > This email and its attachments are scanned for virus by our scanners
    > and are believed to be safe. However, no warranty is given that this
    > email is free of malicious content or virus.
  • Thanks John.

    We have already handled the delegate method. But this won't solve the
    UI issue . We want to disable the red "close" button itself.

    Regards
    Veena
    On 04-Jan-08, at 12:06 PM, John Stiles wrote:

    > I don't know the real answer to your problem, but as a workaround,
    > you can try adding a delegate and implementing -windowShouldClose:
    > to return NO. If that doesn't work, subclass NSWindow and override -
    > close to do whatever you need (of course, calling through to [super
    > close] if you want to allow closing).
    >
    > Good luck!
    >
    >
    > Veena Mayya wrote:
    >> Greetings!
    >>
    >> We have encountered an issue with  window "close" button. In our
    >> application, we are disabling the close button, as we are writing
    >> data to an output device.
    >>
    >> We are showing an authentication dialog, which is put just before
    >> writing the data (using AuthorizationCopyRights).
    >>
    >> In Leopard, soon after the display of the authentication dialog,
    >> the "close" button gets enabled. Even if we try to disable this
    >> button (after disposing the authentication dialog), the button
    >> remain enabled. (using [[AppWindow
    >> standardWindowButton:NSWindowCloseButton]setEnabled:NO];). This
    >> problem do on occur in Tiger and below OS.
    >>
    >> Can anyone please let me know, if we need to set any other flags
    >> to disable the window "close" button in Leopard.
    >>
    >> Thanks in advance.
    >>
    >> Best Wishes
    >> Veena
    >>
    >>
    >>
    >>
    >> -----------------------------------------------
    >> Robosoft Technologies - Come home to Technology
    >>
    >> Disclaimer: This email may contain confidential material. If you
    >> were not an intended recipient, please notify the sender and
    >> delete all copies. Emails to and from our network may be logged
    >> and monitored. This email and its attachments are scanned for
    >> virus by our scanners and are believed to be safe. However, no
    >> warranty is given that this email is free of malicious content or
    >> virus.
    >

    -----------------------------------------------
    Robosoft Technologies - Come home to Technology

    Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
  • On Jan 4, 2008, at 1:33 AM, Veena Mayya wrote:

    > Thanks John.
    >
    > We have already handled the delegate method. But this won't solve
    > the UI issue . We want to disable the red "close" button itself.

    Veena,

    That's actually pretty easy to do.  You just disable the "Close"
    button in the Window Attributes of NIB.  While I don't think it's
    considered "proper" to send images to the list here's a link to a
    screenshot from NIB 3 showing this:

    http://img517.imageshack.us/my.php?image=disablecloseke0.png

    That said.. I don't know that this is a really good design idea.
    Certainly in other GUI environments it's more 'proper' to tell the
    user why the close of the application is being stopped rather than to
    simply block it.

    Just my US$0.02 (not worth as much as it used to be I know, but still).

    --
    David Orriss Jr.

    My blog: http://www.codethought.com/blog
  • Thanks David.

    Actually we don't want to disable the close button, during the launch
    of the application. Even if we do so, the "close" button gets enabled
    soon after putting the authentication dialog. (in 10.5)

    The button remains enabled, even if we try to disable it.(using
    [[appMainWindow standardWindowButton:NSWindowCloseButton]
    setEnabled:NO];).

    Veena

    On 05-Jan-08, at 1:00 PM, <cocoa-dev-request...> wrote:

    >
    >> Thanks John.
    >>
    >> We have already handled the delegate method. But this won't solve
    >> the UI issue . We want to disable the red "close" button itself.
    >
    > Veena,
    >
    > That's actually pretty easy to do.  You just disable the "Close"
    > button in the Window Attributes of NIB.  While I don't think it's
    > considered "proper" to send images to the list here's a link to a
    > screenshot from NIB 3 showing this:
    >
    > http://img517.imageshack.us/my.php?image=disablecloseke0.png
    >
    > That said.. I don't know that this is a really good design idea.
    > Certainly in other GUI environments it's more 'proper' to tell the
    > user why the close of the application is being stopped rather than to
    > simply block it.
    >
    > Just my US$0.02 (not worth as much as it used to be I know, but
    > still).
    >
    > --
    > David Orriss Jr.
    >
    > My blog: http://www.codethought.com/blog
    >

    -----------------------------------------------
    Robosoft Technologies - Come home to Technology

    Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
  • Veena,

    Ah ok.. that's a little more difficult.. but I did it (and I'm a
    relative newb at Cocoa programming so I figure anyone can probably
    pull this off ;) ).

    Try this simple project I put together.  I did it in XCode 3.  Let me
    know if you need it in XCode 2.5.

    http://codethought.com/downloads/DisableCloseButton.zip

    On Jan 6, 2008, at 11:05 PM, Veena Mayya wrote:

    > Thanks David.
    >
    > Actually we don't want to disable the close button, during the
    > launch of the application. Even if we do so, the "close" button gets
    > enabled soon after putting the authentication dialog. (in 10.5)
    >
    > The button remains enabled, even if we try to disable it.(using
    > [[appMainWindow
    > standardWindowButton:NSWindowCloseButton]setEnabled:NO];).
    >
    > Veena
    >
    > On 05-Jan-08, at 1:00 PM, <cocoa-dev-request...> wrote:
    >
    >>
    >>> Thanks John.
    >>>
    >>> We have already ha! ndled the delegate method. But this won't solve
    >>> the UI issue . We want to disable the red "close" button itself.
    >>
    >> Veena,
    >>
    >> That's actually pretty easy to do.  You just disable the "Close"
    >> button in the Windo! w Attributes of NIB.  While I don't think it's
    >> considered "proper" to send images to the list here's a link to a
    >> screenshot from NIB 3 showing this:
    >>
    >> http://img517.imageshack.us/my.php?image=disablecloseke0.png
    >>
    >> That said.. I don't know that this is a really good design idea.
    >>
    >> Certainly in other GUI environments it's more 'proper' to tell the
    >> user why the close of the application is being stopped rather than to
    >> simply block it.
    >>
    >> Just my US$0.02 (not worth as much as it used to be I know, but
    >> still).
    >>
    >> --
    >> David Orriss Jr.
    >>
    >> My blog: http://www.codethought.com/blog
    >>
    >
    >
    > ------------------------------------------! -----
    > Robosoft Technologies - Come home to Technology
    >
    > Disclaimer: This email may contain confidential material. If you
    > were not an intended recipient, please notify the sender and delete
    > all copies. Emails to and from our network may be logged and
    > monitored. This email and its attachments are scanned for virus by
    > our scanners and are believed to be safe. However, no warranty is
    > given that this email is free of malicious content or virus.

    --
    David Orriss Jr.

    My blog: http://www.codethought.com/blog
  • Thanks David for the sample application.

    I think its an issue with Leopard OS, we shall try to file it to
    radar. With your sample application too, we can reproduce the issue.

      Here are the steps

    1. Launch the sample application.
    2. Disable the "close" button, using the "Disable Close Button".
    3. Now launch system preference(or any application that provides
    authentication dialog).
    4. Now unlock any of preference( I have used "Accounts" section), so
    that authentication dialog is displayed.
    5. Now watch the sample application, the "Close" button gets enabled.

    Best Wishes.
    Veena

    On 08-Jan-08, at 11:57 AM, David Orriss Jr wrote:

    > Veena,
    >
    > Ah ok.. that's a little more difficult.. but I did it (and I'm a
    > relative newb at Cocoa programming so I figure anyone can probably
    > pull this off ;) ).
    >
    > Try this simple project I put together.  I did it in XCode 3.  Let
    > me know if you need it in XCode 2.5.
    >
    > http://codethought.com/downloads/DisableCloseButton.zip
    >
    >
    > On Jan 6, 2008, at 11:05 PM, Veena Mayya wrote:
    >
    >> Thanks David.
    >>
    >> Actually we don't want to disable the close button, during the
    >> launch of the application. Even if we do so, the "close" button
    >> gets enabled soon after putting the authentication dialog. (in 10.5)
    >>
    >> The button remains enabled, even if we try to disable it.(using
    >> [[appMainWindow standardWindowButton:NSWindowCloseButton]
    >> setEnabled:NO];).
    >>
    >> Veena
    >>
    >> On 05-Jan-08, at 1:00 PM, <cocoa-dev-request...> wrote:
    >>
    >>>
    >>>> Thanks John.
    >>>>
    >>>> We have already ha! ndled the delegate method. But this won't solve
    >>>> the UI issue . We want to disable the red "close" button itself.
    >>>
    >>> Veena,
    >>>
    >>> That's actually pretty easy to do.  You just disable the "Close"
    >>> button in the Windo! w Attributes of NIB.  While I don't think it's
    >>> considered "proper" to send images to the list here's a link to a
    >>> screenshot from NIB 3 showing this:
    >>>
    >>> http://img517.imageshack.us/my.php?image=disablecloseke0.png
    >>>
    >>> That said.. I don't know that this is a really good design idea.
    >>>
    >>> Certainly in other GUI environments it's more 'proper' to tell the
    >>> user why the close of the application is being stopped rather
    >>> than to
    >>> simply block it.
    >>>
    >>> Just my US$0.02 (not worth as much as it used to be I know, but
    >>> still).
    >>>
    >>> --
    >>> David Orriss Jr.
    >>>
    >>> My blog: http://www.codethought.com/blog
    >>>
    >>
    >>
    >> ------------------------------------------! -----
    >> Robosoft Technologies - Come home to Technology
    >>
    >> Disclaimer: This email may contain confidential material. If you
    >> were not an intended recipient, please notify the sender and
    >> delete all copies. Emails to and from our network may be logged
    >> and monitored. This email and its attachments are scanned for
    >> virus by our scanners and are believed to be safe. However, no
    >> warranty is given that this email is free of malicious content or
    >> virus.
    >
    > --
    > David Orriss Jr.
    >
    > My blog: http://www.codethought.com/blog
    >
    >
    >
    >

    -----------------------------------------------
    Robosoft Technologies - Come home to Technology

    Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
  • Radar bug 5676300, filed yesterday.

    On Jan 8, 2008, at 8:25 PM, Veena Mayya wrote:

    > Thanks David for the sample application.
    >
    > I think its an issue with Leopard OS, we shall try to file it to
    > radar. With your sample application too, we can reproduce the issue.
    >
    > Here are the steps
    >
    > 1. Launch the sample application.
    > 2. Disable the "close" button, using the "Disable Close Button".
    > 3. Now launch system preference(or any application that provides
    > authentication dialog).
    > 4. Now unlock any of preference( I have used "Accounts" section),
    > so that authentication dialog is displayed.
    > 5. Now watch the sample application, the "Close" button gets enabled.
    >
    > Best Wishes.
    > Veena
    > \
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