|
Re: Properties being set to nil?
The fact that you've got two instances of your LTWGameViewController certainly sounds like a bug. It's difficult to tell without looking at your whole project, but my guess is that you've got one
The fact that you've got two instances of your LTWGameViewController certainly sounds like a bug. It's difficult to tell without looking at your whole project, but my guess is that you've got one
|
By
Jon Gotow
·
#1164
·
|
|
Re: Properties being set to nil?
Hi Sandor,
Yes, LTWGameViewController is a subclass of NSViewController and I set the Class in the Storyboard.
When I set a breakpoint in the Set Delegate method it shows the property set ok. Later
Hi Sandor,
Yes, LTWGameViewController is a subclass of NSViewController and I set the Class in the Storyboard.
When I set a breakpoint in the Set Delegate method it shows the property set ok. Later
|
By
Dave
·
#1163
·
|
|
Re: Properties being set to nil?
I’ve seen this happen if the view controller is instantiated in code and in the NIB (not sure about storyboards)
It gets hooked up correctly one time and things are nil in the other case. Are you
I’ve seen this happen if the view controller is instantiated in code and in the NIB (not sure about storyboards)
It gets hooked up correctly one time and things are nil in the other case. Are you
|
By
Sandor Szatmari
·
#1162
·
|
|
Re: Properties being set to nil?
Hi,
This is the only place the View Controller is instantiated. One thing I’ve notice is that if I set a breakpoint in ViewDidLoad and print self:
< LTWMacGameViewController: 0x600003500840>
and
Hi,
This is the only place the View Controller is instantiated. One thing I’ve notice is that if I set a breakpoint in ViewDidLoad and print self:
< LTWMacGameViewController: 0x600003500840>
and
|
By
Dave
·
#1161
·
|
|
Re: Properties being set to nil?
Any chance you're reloading your view controller (when starting a new game or whatever) and not subsequently setting the delegates again?
- Jon
Any chance you're reloading your view controller (when starting a new game or whatever) and not subsequently setting the delegates again?
- Jon
|
By
Jon Gotow
·
#1160
·
|
|
Properties being set to nil?
Hi All,
I have a View Controller that is Instantiated in code from a storyboard file:
myGameViewController = [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainViewControllerID];
if
Hi All,
I have a View Controller that is Instantiated in code from a storyboard file:
myGameViewController = [myStoryboard instantiateControllerWithIdentifier:kLTWGameMainViewControllerID];
if
|
By
Dave
·
#1159
·
|
|
Re: Header Files
Great !
Peter
By
Peter Hudson
·
#1158
·
|
|
Re: Header Files
I usually type out the symbol I’m looking for and then right click and select jump to definition.
Sandor
I usually type out the symbol I’m looking for and then right click and select jump to definition.
Sandor
|
By
Sandor Szatmari
·
#1157
·
|
|
Header Files
I’m trying to find which files numerical min max types are defined in.
Specifically, NSUInteger and its associated types.
I have’nt had to look any up for so long, I’ve completely forgotten
I’m trying to find which files numerical min max types are defined in.
Specifically, NSUInteger and its associated types.
I have’nt had to look any up for so long, I’ve completely forgotten
|
By
Peter Hudson
·
#1156
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Excellent! Glad that was the trick!
Excellent! Glad that was the trick!
|
By
Sandor Szatmari
·
#1155
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Hi,
Ahhh, you mean, awakeFromNib in the AppDelegate not the window/view controller. I think I was trying to avoid tying the initialisation to a NIB (in case I ever created it programmatically), but I
Hi,
Ahhh, you mean, awakeFromNib in the AppDelegate not the window/view controller. I think I was trying to avoid tying the initialisation to a NIB (in case I ever created it programmatically), but I
|
By
Dave
·
#1154
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
There’s a test app attached to demonstrate…
Sandor
There’s a test app attached to demonstrate…
Sandor
|
By
Sandor Szatmari
·
#1153
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
I see different behaviour. Here’s a test app. No matter what I do, -awakeFromNib is always called first. I tried it both in the AppDelegate, and in the ViewController subclass.
Cheers,
Sandor
I see different behaviour. Here’s a test app. No matter what I do, -awakeFromNib is always called first. I tried it both in the AppDelegate, and in the ViewController subclass.
Cheers,
Sandor
|
By
Sandor Szatmari
·
#1152
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Hi,
A little more on this.
If I uncheck “Is Initial Controller”, then applicationDidFinishLaunching gets calls as expected.
So I put the code back to instantiate it manually and all works as
Hi,
A little more on this.
If I uncheck “Is Initial Controller”, then applicationDidFinishLaunching gets calls as expected.
So I put the code back to instantiate it manually and all works as
|
By
Dave
·
#1151
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Hi,
This is a Mac project but I will be doing an IOS version too.
I’ve tried applicationWillFinishLaunching and applicationDidFinishLaunching, but the View Controller gets control before either
Hi,
This is a Mac project but I will be doing an IOS version too.
I’ve tried applicationWillFinishLaunching and applicationDidFinishLaunching, but the View Controller gets control before either
|
By
Dave
·
#1150
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Is this a document-based app or a single-window type app?
In my single-window apps, AppDelegate:applicationDidFinishLaunching is called first, and instantiates and displays the main window, so the
Is this a document-based app or a single-window type app?
In my single-window apps, AppDelegate:applicationDidFinishLaunching is called first, and instantiates and displays the main window, so the
|
By
Jim
·
#1149
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
If you’re going to look at -init, if it’s an object coming from a NIB then look at overriding -initWithCoder:
If you’re going to look at -init, if it’s an object coming from a NIB then look at overriding -initWithCoder:
|
By
Sandor Szatmari
·
#1148
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Since you referenced a Window, I’m assuming MacOS application, not iOS. Probably the same, but not sure since I don’t program for iOS.
According to the documentation,
Since you referenced a Window, I’m assuming MacOS application, not iOS. Probably the same, but not sure since I don’t program for iOS.
According to the documentation,
|
By
Jonathan Prescott
·
#1147
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
The thing is, this Code is supposed to initialize the App Sub-system before any other parts of the App get called. If I put it in AwakeFromNib then the initalization will be dependant of which Window
The thing is, this Code is supposed to initialize the App Sub-system before any other parts of the App get called. If I put it in AwakeFromNib then the initalization will be dependant of which Window
|
By
Dave
·
#1146
·
|
|
Re: When does AppDelegate:applicationDidFinishLaunching get called?
Hi,
It seems that whichever method I use, the view get called first. I need a way of initialising App Sub-systems before any view gets called. I’m not sure if this has changed or not or whether its
Hi,
It seems that whichever method I use, the view get called first. I need a way of initialising App Sub-systems before any view gets called. I’m not sure if this has changed or not or whether its
|
By
Dave
·
#1145
·
|