Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom sheets without going application modal?



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.

References: 
 >Custom sheets without going application modal? (From: Joshua Scott Emmons <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.