On Jun 24, 2008, at 7:43 AM, Johan Kool wrote:
You create your controller with this:
spriteController = [[SpriteController alloc]
initWithWindowNibName:@"YourNib"];
and to show the window you use:
[[spriteController window] makeKeyAndOrderFront:self];
or
[[spriteController spriteWindow] make
On Jun 24, 2008, at 8:17 AM, Joseph Ayers wrote:
SpriteController and SpriteView are defined and connected in the NIB
Your nib shouldn't contain a SpriteController instance. Instead, it
should set the class of File's Owner to SpriteController and make the
outlet connection from File's Owne
Hi,
You should not be allocating either SpriteView or SpriteController if
they are referred to in the NIB. (which is the normal case).
Instead you go to the File's Owner object in interface builder, and go
to the Identity tab, and set the Class to be whatever class contains
your loadNib
You do not allocate outlets. Outlets point to instances in your nib.
These instances are instantiated(/allocated) when the nib is loaded.
You usually set the File's Owner to be a your own subclass of
NSWindowController. Next control-drag from the File's Owner icon to
the window and the view
I am quite confounded with regard to how/when to allocate outlets which
are classes existing as instances in
another class. Consider
@interface SpriteController : NSWindowController {
IBOutlet SpriteView* spriteView;
IBOutlet NSWindow* spriteWindow;
}
SpriteController* spriteController;