FROM : Nathaniel Gottlieb-Graham
DATE : Mon Mar 10 21:20:59 2008
Yup, The windows were released when closed, and I was using -close
rather than -orderOut. Thanks guys!
On Mar 10, 2008, at 2:31 PM, Matt Mashyna wrote:
> On Mar 10, 2008, at 2:12 PM, Nathaniel Gottlieb-Graham wrote:
>
>> This is going to sound really stupid, but how do you show an
>> NSWindow? [aWindow close] seems to be the appropriate method to
>> close it, but idiotically enough, I can't seem to find a way re-
>> show the window once it's no longer on-screen. [aWindow
>> makeKeyAndOrderFront:sender] will only bring the window forward if
>> it's already visible, and doesn't seem to do anything if the window
>> isn't already there. I've searched through NSWindow's class
>> reference, and I may be overlooking something obvious, but I just
>> can't seem to figure this out.
>>
>>
>> Thanks,
>> Nathaniel
>>
>
> Well, I can think of something. I do this all the time for things
> like an info window. I have an app controller with an IBOutlet to
> the window I want to hide and show and I call [aWindow
> makeKeyAndOrderFront:self] to show it and [aWindow close] to hide
> it. You need to make sure that you have the "Release when Closed"
> checkbox turned off in IB to make sure it doesn't, uh ... get
> released when closed.
>
> If it's not showing when you do this, look in the debugger console
> to see if you are getting an exception and check in the debugger
> when you are about to show it and see if it's stale.
>
> Hope that helps.
>
> Matt
>
DATE : Mon Mar 10 21:20:59 2008
Yup, The windows were released when closed, and I was using -close
rather than -orderOut. Thanks guys!
On Mar 10, 2008, at 2:31 PM, Matt Mashyna wrote:
> On Mar 10, 2008, at 2:12 PM, Nathaniel Gottlieb-Graham wrote:
>
>> This is going to sound really stupid, but how do you show an
>> NSWindow? [aWindow close] seems to be the appropriate method to
>> close it, but idiotically enough, I can't seem to find a way re-
>> show the window once it's no longer on-screen. [aWindow
>> makeKeyAndOrderFront:sender] will only bring the window forward if
>> it's already visible, and doesn't seem to do anything if the window
>> isn't already there. I've searched through NSWindow's class
>> reference, and I may be overlooking something obvious, but I just
>> can't seem to figure this out.
>>
>>
>> Thanks,
>> Nathaniel
>>
>
> Well, I can think of something. I do this all the time for things
> like an info window. I have an app controller with an IBOutlet to
> the window I want to hide and show and I call [aWindow
> makeKeyAndOrderFront:self] to show it and [aWindow close] to hide
> it. You need to make sure that you have the "Release when Closed"
> checkbox turned off in IB to make sure it doesn't, uh ... get
> released when closed.
>
> If it's not showing when you do this, look in the debugger console
> to see if you are getting an exception and check in the debugger
> when you are about to show it and see if it's stale.
>
> Hope that helps.
>
> Matt
>
| Related mails | Author | Date |
|---|---|---|
| Nathaniel Gottlieb… | Mar 10, 19:12 | |
| I. Savant | Mar 10, 19:25 | |
| Dave Hersey | Mar 10, 19:30 | |
| Matt Mashyna | Mar 10, 19:31 | |
| Nathaniel Gottlieb… | Mar 10, 21:20 | |
| Nathaniel Gottlieb… | Mar 10, 22:40 | |
| Mike Abdullah | Mar 11, 00:09 | |
| Nathaniel Gottlieb… | Mar 11, 01:06 |






Cocoa mail archive

