Re: How to tell if a Panel is Open [solved]

2009-06-12 Thread Scott Ribe
> Thanks to those who helped me with this question. The solution was to > use NSWindow's -attachedSheet method, and (in my case), check for > nil. If nil, there is no attached sheet; if not nil, there is an > attached sheet. Yes there's a call for that so you don't need to carry around a state v

Re: How to tell if a Panel is Open [solved]

2009-06-11 Thread K. Darcy Otto
Thanks to those who helped me with this question. The solution was to use NSWindow's -attachedSheet method, and (in my case), check for nil. If nil, there is no attached sheet; if not nil, there is an attached sheet. ___ Cocoa-dev mailing list (

Re: How to tell if a Panel is Open

2009-06-09 Thread K. Darcy Otto
Well, the sheet has to do some pretty complicated things, so I gave it its own NSWindowController subclass (PanController). The sheet's window controller is created by my NSDocument subclass (MyDocument). The thing is though, PanController is not a subclass of NSDocument, so it's strange

Re: How to tell if a Panel is Open

2009-06-09 Thread Scott Ribe
Sounds like you're creating a new window controller when you create the sheet. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: How to tell if a Panel is Open

2009-06-08 Thread K . Darcy Otto
Since the link isn't working for me, could you give me an idea of what part and document you are referring to? Is it, by any chance, the - attachedWindow method? I tried this, but I get (null), whether or not the sheet is open. Interestingly, if I send -isSheet to the sheet, I get YES onc

Re: How to tell if a Panel is Open

2009-06-08 Thread Nick Zitzmann
On Jun 8, 2009, at 2:08 PM, K. Darcy Otto wrote: In my -validateUserInterfaceItem: method, I need to know whether a particular panel is open (and this panel comes down as a sheet in front of the main window). How can I determine whether that panel has come down as a sheet? > Nick Zit