Hi all!
I have a UISegmentedControl and whenever I touch a button it should show an alert with the index of the segment currently selected:
- (IBAction)bOkayTouched:(id)sender
{
NSString *msg = [NSString stringWithFormat:@"%@", [scRPSSL selectedSegmentIndex]];
UIAlertView *lol = [[UIAlertView alloc] initWithTitle:@"Mkay" message:msg delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil];
[lol show];
[lol release];
}
However, the app crashes when it must create the NSString. But it does not crash when I replace that line with:
NSString *msg = [NSString stringWithFormat:@"XD"];
or similar.
Oh, and here's what the debugger tells me:
[Session started at 2009-08-30 21:04:38 +0200.]
[Session started at 2009-08-30 21:04:43 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 4630.
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
(gdb)
Can anyone help me?
Also, the alert says '(null)' if the selected index is 0 (zero).
Thanks!