Tuesday, June 9, 2009

Purchasing Update

It's been an interesting day. I had planned on hammering out all of the travel elements but instead got sucked down a rabbit hole doing what I thought would be a quick modification to my code base. But NOOOO. Instead, I've been beating my head against what ought to be a very simple thing - getting a subview to display. I'm not sure what the problem is yet but I've been trying to figure out what I'm doing wrong. I have a tab control with a view controller that manages the main profile page. From there I can go to a spellbook or to the affinities page. I want to display the profile summary on each of these pages, so I made a subview called ProfileDetailViewController that I'm creating in ProfileViewController::viewDidLoad. I tried to addSubview to no effect so then I tried to insertSubview with an atIndex:0. No love there either. The interesting thing (and this is where I think it may be some kind of race/initialization issue) is that when I tried to create the strings to display the data it kept returning "Invalid".
HOWEVER, I just solved it. I had an epiphany while I was out an about this afternoon getting Cathy (her last day of school is tomorrow) and tried something that worked correctly and perfectly. I still need to do some things to make it completely functional and spread across the multiple view controllers, but I'm much happier now. :)
On the purchasing side of things, I've been looking at the Store Kit API that Apple just published. I believe that this is all in OS 3.0 so I'll need to wait for that to come out (which should be next week, theoretically). That should provide the opportunity to do what I want to do, so I'll be a much happier camper there as well. :)
So what started off as something of a bust of a day has now ended up quite nicely. I'll finish the profile summary tonight after Taekwondo and feel even more accomplished.