• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re: Spawning windows.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Spawning windows.


  • Subject: Re: Re: Spawning windows.
  • From: "Shawn Erickson" <email@hidden>
  • Date: Fri, 10 Nov 2006 11:56:33 -0800

On 11/10/06, George C <email@hidden> wrote:
> Is there some sort of indentification associated with each window
> > object?
>
> No, but you could connect it to an outlet.
>
>
If I connect it to an outlet, do I need to allocate an instance of it?

No. IBOutlets connect to objects in the nibs, objects in nibs exist already.

What would I do to make the window be displayed?

Review the NSWindow documentation and related conceptual documentation. Look for -[NSWindow orderFront:], -[NSWindow makeKeyAndOrderFront:].

<file:///Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/index.html>
<file:///Developer/ADC Reference Library/documentation/Cocoa/Conceptual/WinPanel/index.html>

What would the Cocoa code look like to do this?

@interface MyController : NSObject { IBOutlet NSWindow* window; } - (void)showWindow; @end

@implementation
- (void)showWindow
{
   [window makeKeyAndOrderFront:self];
}
@end

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Spawning windows. (From: "George C" <email@hidden>)
 >Re: Spawning windows. (From: Nick Zitzmann <email@hidden>)
 >Re: Spawning windows. (From: "George C" <email@hidden>)

  • Prev by Date: Re: Spawning windows.
  • Next by Date: Re: Re: Spawning windows.
  • Previous by thread: Re: Spawning windows.
  • Next by thread: Re: Re: Spawning windows.
  • Index(es):
    • Date
    • Thread