Louis Sumberg <
[hidden email]> wrote in message
news:9ttfnu$ljt$
[hidden email]...
> One way might be to subclass Dialog, override cancel (to do nothing).
That
> seems to take care of the cancel button and escape key. You'd also have
to
> set hasSysMenu to false so the user can't close it that way. It seems to
> work though I wouldn't say it's pretty.
Thanks for the response. Interesting, that did not seem to work for me on
Windows 2000. Overriding the cancel method would prevent the cancel button
from working, but the escape key would still cancel. It was very late, and
maybe my mind was not working.
Anyhow for posterity sake I found out how to do it in queryCommand: which
seems more proper anyway. I looked at ProgressDialog<<queryCommand: for an
example. This bit of code and comment seem to explain it, it needed
something special :
"Note that we need to force ourselves as the command target to disable
cancel"
query isEnabled: self allowCancel; receiver: self.
Once I did that in my dialog it worked as I wanted it to.
Chris