jump to navigation

Tab Bar Errors 22 June 2009

Posted by Oliver Mason in Apple, iphone, objective-c, programming.

DAY 9 and more frustration. My ViewControllers didn’t seem to be called, and NSLog messages I put in didn’t appear on the console. And the whole thing crashed without me knowing what was going on.

Having another look at my iPhone development book, I realised the first mistake: the TabBar Controller wasn’t aware of which controllers to call up for the various tabs, something you need to set up in Interface Builder. Still don’t really like that way of doing things, as the fact you’ve done it (or not, as the case may be!) is not easily transparent.

After completing the tab bar attributes, the log messages suddenly turned up, which was good, and it also doesn’t crash. Well, at least not where it used to crash. Now it crashes in the loop where I read stuff out of the SQLITE database, and it crashes after the second iteration. Wonder what the cause is. Probably memory management. Mixing Objective-C and plain C makes things a bit confusing. And I don’t like that NSString is an object you need to allocate, but NSInteger is basically just an alias for int, so a primitive data type rather than an object.

Anyway, more bug hunting coming up. It all feels terribly slow, but then I’m only spending a few hours every couple of weeks on it at the moment.



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: