| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Marc,
Thanks, George
On Nov 10, 2006, at 2:43 PM, George C wrote:
If I connect it to an outlet, do I need to allocate an instance of it? WhatIs there some sort of indentification associated with each window > object?
No, but you could connect it to an outlet.
would I do to make the window be displayed? What would the Cocoa code look
like to do this?
George, what you need to do is read some getting started documentation. Everyone is trying to help but making, what I judge from your questions, an assumption that you know how to write a Cocoa application using Objective-C. It seems pretty clear that you don't (apologies if I misread you). This will help (http://developer.apple.com/technotes/tn/tn2005.html). You don't "spawn" windows when you use Interface Builder. Spawn means create. What you want to do is show the window you have in your nib. An outlet is an instance variable connected to an object. If you create an outlet in your controller and connect it to your window, when your nib is loaded, an instance of your controller will be instantiated and the the window you laid out in IB will be created and the outlet will be connected to it. You don't have to allocate an instance (I prefer to say "instantiate" - I find using the object-oriented terminology helps me) because that is done when the nib is loaded. Now that the window is created and your controller instantiated and the outlet connected, you can invoke any method on the window that it responds to (see all the links that everyone has sent you). Finally, there is no such thing as "Cocoa code." Cocoa is the name of a set of frameworks. Since Java is deprecated, it's safe to say that you use Objective-C so you might ask what the Objective-C code looks like but you might as well say "will someone please write this for me."
Read the tutorials and read through the docs. After you've read some documentation and tried some things, you'll be in better shape to ask more meaningful questions.
Good luck Marc
_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/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>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.