'EXC_BAD_ACCESS' When trying to access a variable?

Posted by Nick Brooks on Stack Overflow See other posts from Stack Overflow or by Nick Brooks
Published on 2010-05-23T15:39:47Z Indexed on 2010/05/23 15:40 UTC
Read the original article Hit count: 214

Filed under:
|
|

I get an 'EXC_BAD_ACCESS' error when trying to access variable in a function other than the one it was set in:

NSLog(@"Commening search (%@)",sessionID); // This causes it

The variable is set in the 'awakeFromNib' function:

//Retrieve Session-ID
sessionID = [self getSessionID];

The variable itself is defined in the header:

NSString *sessionID;

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa