Re: Custom sheets without going application modal?
Re: Custom sheets without going application modal?
- Subject: Re: Custom sheets without going application modal?
- From: Sherm Pendley <email@hidden>
- Date: Sun, 29 Dec 2002 21:23:14 -0500
On Sunday, December 29, 2002, at 04:33 PM, Joshua Scott Emmons wrote:
My application pulls up a custom sheet to enter some new-record info.
Every example I've ever seen to get a custom sheet working uses
something like the following:
... snip ...
Correct me if I'm wrong, but this takes the *whole application* modal,
right?
Yep, you're right. Don't quote me on it, but I *think* that the
erroneous examples can be traced back to some Apple docs that were, at
one point, a bit vague on the subject. The current docs are clearer.
What is the danger in me implementing the above like so:
No danger at all - in fact, it's the preferred way to open a
window-modal (as opposed to app-modal) sheet.
[mySheet orderOut:self];
One minor nit - orderOut: makes the sheet invisible, but doesn't release
it. That's good for a sheet that could be used relatively frequently, as
it pops up quicker on subsequent uses. But, for an infrequently-used
sheet, you could save a bit of memory by sending it a close message
instead, which releases it.
sherm--
UNIX: Where /sbin/init is Job 1.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.