Re: This is bullsheet
Re: This is bullsheet
- Subject: Re: This is bullsheet
- From: Steve Klingsporn <email@hidden>
- Date: Sun, 27 Oct 2002 01:56:16 -0500
Thanks. Yeah, I figured that out.
Why does Apple's sample code use runModal?!
Oh well, my sheets are clean now. =)
So here's what I do now:
To show a sheet:
NSApplication.sharedApplication().beginSheet(
NSPanel, NSWindow, target, null, null);
To dismiss the sheet:
sheet.orderOut(null);
NSApplication.sharedApplication().endSheet(sheet);
I assume that the Obj-C and Java cases are the same. Regardless, I'm
going to write up a web page with all sorts of stuff I've learned in
developing my app so people have yet another source for this info.
Modal means "bad," and I'm really glad we don't need to use those
methods. =)
Thank you for your help,
Steve
On Sunday, October 27, 2002, at 01:51 AM, j o a r wrote:
>
>
1) I don't really know about Cocoa for Java, but in Objective-C you
>
wouldn't (probably _shouldn't_) use the runModal and stopModal methods
>
- it's all taken care of by the beginSheet and endSheet methods.
>
>
2) If you want to close the sheet and end the modal session from
>
another method all you need is a reference to the sheet window,
>
because that is what you pass to the endSheet method (again, at least
>
in ObjC).
>
>
j o a r
>
>
On Sunday, Oct 27, 2002, at 07:07 Europe/Stockholm, Steve Klingsporn
>
wrote:
>
>
> Okay...
>
>
>
> This seems to be the proper order to call things when doing sheet:
>
>
>
> NSApplication.beginSheet()
>
> NSApplication.runModalForWindow()
>
> NSApplicaion.stopModal()
>
> NSApplication.endSheet()
>
> sheet.orderOut()
>
>
>
> So if I want to properly close a sheet from another method, what is
>
> the correct order?
>
>
>
> I've tried everything I can think of, and the close and minimize
>
> boxes on my windows are disabled.
>
>
>
> Thanks,
>
> Steve
>
> _______________________________________________
>
> 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.
_______________________________________________
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.