Re: Toolbar Item Validation in a Panel
Re: Toolbar Item Validation in a Panel
- Subject: Re: Toolbar Item Validation in a Panel
- From: j o a r <email@hidden>
- Date: Mon, 25 Oct 2004 07:49:39 +0200
On 2004-10-22, at 20.26, R. Scott Thompson wrote:
No... not really. As I recall from starting out with Cocoa in the
early days of the "Yellow Box" I recalled that the About Box for the
application was implemented as an NSPanel. When I needed a modal
dialog I simply used an NSPanel because... I thought that's what you
did.
Reading the documentation farther, it would appear that an NSPanel is
something that doesn't have a clear analog in Carbon, the framework
I'm most familiar with.
At first glance it looks like a panel is really there to provide
semi-modal dialogs. I'm familiar with semi-modal dialogs, but they
require some gratuitous hoop jumping in Carbon.
NSPanel is a really slim subclass of NSWindow. The most important
difference between panels and windows is that panels per default never
becomes the "main" window of the application (check the accessor
methods mainWindow and keyWindow in NSApplication).
The reason is that in a document based application it is often
important to be able to distinguish between the main document window
and it's auxiliary panels. The active auxiliary panel (key window)
needs to be able to identify the "active document" window (main
window), in order to be able to know which one to inspect / affect.
This could be solved in a variety of ways, but the main-key window
scheme makes this almost completely automatic in most cases. It's just
convenient.
Aqua will also help you interact with the windows of an application by
using a different title bar appearance for key, main, and inactive
windows.
I'll go ahead and file a bug too JIC.
I think that's a good idea!
j o a r
_______________________________________________
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