Note: In July 2013 we changed the forum markup language—we now
use Markdown. This may cause minor formatting issues with existing posts.
07 Sep 2010, 16:01
I am a bit confuse when we create the the Window Controller instance in the HelloApplicationDelegate.
In chapter 14:
[[WindowController alloc] initWithWindowNibName:@"MainWindow"];
- Do we need to create a member variables to capture the return value of the WindowController?
- When it reaches the end of this function, wouldn’t the WindowController instance get destroyed?
- If we do the same thing with ActivityController & CurrentApp (i.e not capturing the returned instance using a member variable), I notice that both instances will get destroyed right after the WindowController init() method returns. But it is not the case here with WindowController.
18 Aug 2011, 06:15
In xcode 4.2 it appears you need to have something to actually make the window appear.
I added the following in HelloApplicationAppDelegate.h:
@property (strong) MyWindowController *wc;
As well as the obligatory ` @synthesize ` and assignment as suggested.
You must be logged in to comment