> Learning your way around the documentation takes awhile, but do it whenever
> you can.  In your Xcode documentation window, in the search field at the top
> right, type "Sheet Programming Topics".  You'll get a wonderful document
> which will explain many things you can't figure out by following sample
> code.
>

I've seen the Sheet Programming Topics on the Macdev center, that's where I
saw that sample code. (For some reason, I can't search the XCode
Documentation for the programming guides; it's loaded, but nothing shows in
search; the API searches fine.) I do find their guides pretty helpful.

One of the things you will find in that document is that cascading sheets
> are not supported or desirable.  We had a discussion on an alternative to
> this, presenting sheets serially, a few days ago.  Read the thread "wait for
> sheet result" on this page:
> http://lists.apple.com/archives/cocoa-dev/2010/Jan/thrd4.html#00366
>

Hmm. Good points. I thought of a better way to do it in my application. But
I'm still interested in how to do the below for another task (not
cascading).

Yes, you can load a window from any xib you want to, or even create one in
> code, and then attach it to a window as a sheet.
>

That's what I can't get to work, that's where I'm still confused. This piece
of code here:

-----------------
if (!myCustomSheet)
        [NSBundle loadNibNamed: @"MyCustomSheet" owner: self];

[NSApp beginSheet: myCustomSheet
       modalForWindow: window
       modalDelegate: self
       didEndSelector: @selector(didEndSheet:returnCode:contextInfo:)
       contextInfo: nil];
----------------

I get that "myCustomSheet" is an NSWindow reference, but how does it know to
be the particular window I want to show? When the nib is loaded, where does
it go (in code)? How do I connect the window in the MyCustomSheet XIB to an
outlet in the AppDeletegate file? I am stuck there...

Thanks...
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to