Program flow through a message and back

Back in the days of coding Atari ST I was fairly familiar with what was really going on in the processor after I compiled and ran my code.  I knew that it was running sequentially. And if I jumped or branched off to a subroutine, I knew that it was run that and then return.  It was an event based system with a menu bar… one of the first.. but still it was a main program loop that waited for events and then acted on them, running the code to act on them, and then return to the main loop and wait for the next event.

But today with multi-code processors and multi-threaded code, I have to admit that half the time I don’t really know much about what’s really happening in the compiled code from a program flow standpoint.  Does it sometimes run down two threads of code at the same time?  I sort of assume that it does at times.  But I don’t really know. Continue reading

Posted in iOS

Table Views – the missing guide

TableViews in iOS is like coding 101 – it should be one of the first things that you learn. Lots of apps use table views, including many of the built in apps in the iPhone. Nonetheless I’ve been struggling with them for a week and spent a good few weeks before that avoiding this task all together.  And in my debugging and trying to figure out how to do the exact thing I want to do with a table view, I’ve found that the necessary information is spread out all over the docs and some of it is just not there.

I think one reason for the lack of detailed documentation is that tableviews are one of the basic views of iOS and as such there’s almost an endless list of things that can be done with them.  But I don’t want to do any of those things.  I want to make a basic table that pops up in my app as an options or settings view.  It needs to have a DONE button and it needs to drill down to allow option selection in the same way that the Settings app does in the iPhone.

So I might as well provide some of the answers here, if for no other reason, so I can reference back to it later the next time I want to do this.  This is another long post so buckle up… Continue reading

Posted in iOS