Re: Open second Window
Re: Open second Window
- Subject: Re: Open second Window
- From: Fritz Anderson <email@hidden>
- Date: Mon, 17 Nov 2008 11:54:43 -0600
On 16 Nov 2008, at 7:42 PM, Barry Fawthrop wrote:
I'm new to Xcode and Apple development
I have started my first application and on the main window I have a
button, which when pressed I would like it to open a second window.
Could someone please point me in the right direction
Welcome. Be sure to work the examples in Apple's tutorials, or in
Aaron Hillegass's excellent book before you get too far into Cocoa
programming. Having a foundation will save a lot of heartache.
In outline: Create a basic Cocoa project. From the Resources group,
double-click to open MainMenu.xib. Drag an NSButton into the window
that appears (this is your main window). Drag your second window into
the XIB window; set its properties so Visible at Launch and Release
When Closed are not checked.
Drag a button into your main window. Control-drag from the button to
the second window (either its title bar, or its icon in the XIB
window). Select the makeKeyAndOrderFront: action.
The resulting application will do what you want, but it's so
oversimplified it's not practical for developing into something
useful. It doesn't connect to any data or nontrivial control logic.
You'll need to work the examples to get much further.
— F
--
Fritz Anderson -- Xcode 3 Unleashed: Now in its second printing -- <http://x3u.manoverboard.org/
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden