Hi there. Objective C is extremely fiddly and convoluted, in my eyes. I want to take this code:
... and I want the number of times the window was moved, to be output to a label. I am told I need to do some kind of string conversion
whatever that means, and had some smartass IRC guy keep linking me to Apple's documents, when in fact, all I wanted was a little help (this is why IRC earns it's rep as code snobs!!).
Please - what do I convert to what, FROM what?. I just want the value stored in 'cnt' to be output to a label - can it be THAT hard to explain?.
Thanks.
Code:
@implementation appController
int cnt,rsz=0;
-(IBAction)sendText:(id)sender{
[myText setStringValue:[sourceText stringValue]];
[myButton setTitle:@"clicked"];
}
-(void)windowDidResize:(NSNotification *)winSize{
NSLog(@"The window did resize");
rsz++;
NSLog(@"Window resizes: %i",rsz);
}
-(void)windowDidMove:(NSNotification *)winMove{
NSLog(@"The window did move");
cnt++;
NSLog(@"Window moved %i times",cnt);
}
-(void)windowDidMiniaturize:(NSNotification *)winMin{
NSLog(@"Window went to Dock");
}
-(void)windowDidDeminiaturize:(NSNotification *)winUnMin{
NSLog(@"Window came from Dock");
}
@end
... and I want the number of times the window was moved, to be output to a label. I am told I need to do some kind of string conversion
Please - what do I convert to what, FROM what?. I just want the value stored in 'cnt' to be output to a label - can it be THAT hard to explain?.
Thanks.