RE: How to know user clicks [print] button in cocoa PDE
RE: How to know user clicks [print] button in cocoa PDE
- Subject: RE: How to know user clicks [print] button in cocoa PDE
- From: "Jeff Chen" <email@hidden>
- Date: Wed, 13 Sep 2006 14:01:14 +0800
Hi
How do you close your cocoa window?
I think your cocoa dialog should be run modally,isn't it? Then when you close the cocoa dialog, you can't simply use [NSWindow close], you must quit modal status for the dialog.
Your code should be following:
[NSApp stopModal];
[YourCustomCocoaWindow close];
Best Regards
Jeff Chen
-----Original Message-----
From: printing-bounces+jeff-sdcc.chen=email@hidden
[mailto:printing-bounces+jeff-sdcc.chen=email@hidden
m]On Behalf Of nishino tetsuya
Sent: Tuesday, September 12, 2006 7:46 AM
To: email@hidden; email@hidden; cocoa-dev@lists.
apple.com
Subject: RE: How to know user clicks [print] button in cocoa PDE
Hi,
I don't have idea for your problem, but can I ask you question.
I am having the following problem:
I made PDE in 10.3.8. When you open a document with Safari and click
"Print" button,
the PDE will show a dialog (Cocoa). Then, as soon as you click "OK" button
on the dialog it will be
closed. However, the window for the Safari document no longer has focus
(the three buttons
in the top left (Close, Minimize & Maximize) become grayed-out and
disabled.).
All you can do is to quit Safari comletely from "Safari" menu.
Is there any way to manually change focus from Cocoa window to Carbon
window?
In 10.4, the OS takes care of this.
Thanks,
Tetsu Nishino
From: "Yu, Min" <email@hidden>
To: "email@hidden" <email@hidden>,
"email@hidden" <email@hidden>
Subject: How to know user clicks [print] button in cocoa PDE
Date: Fri, 8 Sep 2006 10:09:13 +0800
Hi All,
I met with a problem when I made PDE with cocoa:
I can't catch the event that user presses [Print] button, in carbon PDE, I
can get the ControlRef of [Print] button and install event handler to it.
However, in cocoa, I can only get the NSButton * pointer of [Print] button,
but I can't install event handler to NSControl in cocoa. I can only use
the event in NSResponder. But NSResponder doesn't provide the event that
handles the clicking of [Print] Button.
Who knows how I can catch the event that user clicks [print] Button in
cocoa? Or who knows how to install event handler to a special NSControl in
cocoa?
Best Regards
Jeff Chen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden