Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jeremy1026

macrumors 68020
Original poster
Nov 3, 2007
2,215
1,029
I have made the connection in IB.

Code:
[onesLabel setTitleWithMnemonic:@"1"];
and
Code:
[onesLabel setStringValue:@"1"];

both don't do squat. What are some debugging methods you would use to figure out why the label won't update?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
What method are you using this in? If it's from init then the nib hasn't loaded yet. I'd double-check your IB connection again.
 

Jeremy1026

macrumors 68020
Original poster
Nov 3, 2007
2,215
1,029
What method are you using this in? If it's from init then the nib hasn't loaded yet. I'd double-check your IB connection again.

I'm doing the update in a method called newGame. Which is called from another file using [gmView newGame]; (I know this part works because of an NSLog.) What is weird though, is that putting the change code in the awakeFromNib (which gets called on the app start up) works.
 

eddietr

macrumors 6502a
Oct 29, 2006
807
0
Virginia
I'm doing the update in a method called newGame. Which is called from another file using [gmView newGame]; (I know this part works because of an NSLog.) What is weird though, is that putting the change code in the awakeFromNib (which gets called on the app start up) works.

In that case I would set a breakpoint in - newGame to see if in fact "onesLabel" is still a valid pointer to the correct NSTextField.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.