hatdragon.com - i code therefore i am

Monday, June 29, 2009

Calling All Talent

So I made the mistake of trying to pull this together on a weekend.Let me try again now that people are awake and on the internet and not partying. ;)

I'm trying to put together a quasi-community posting for all of my creative and talented people, introducing them all to each others works and spread the love at the same time. If all of my artists, writers, musicians, crafters, etc can please send me a way for people to get to their various trades, I'll finish putting my post together and get it out, let's call it Wednesday, and hopefully get some new love for all :)

So, with that, send me YOUR information. I'll collect it all, and get a big, interesting talent-filled together and put it up with what I'd like you all to do then.

Stay tuned.

Labels: , , , ,







Thursday, June 25, 2009

Progress Report

So, over the past few evenings, I've been slamming into a brick wall of sorts.

I'm working on the iPhone app pretty much non-stop, and over the past few nights I've been messing with the UITableView and a custom UITableViewCell. This, this has proved interesting. The first evening, the data loaded into my UITableView, but the UITableViewCell never rendered it's contents. I could select a row, I could scroll the table, but you couldn't see what was in them. Night two, was more of the same in a difference manner. Night three was more fruitful. After rewriting the implementation of my UITableViewCell, I ended up getting a background color to at least display for each cell! Woo! Progress. It might now seem like much, but trust me, after two days of fighting with rendering code and having nothing make a difference, it was huge!


So, for those of you following along going, "okay, so, what did you do differently?" Let me try and explain.


In my TableViewController, I have something like the following:





- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"myTask";

myTaskCell *cell = (myTaskCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {
cell = [[[myTaskCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}

// Set up the cell...
myTaskDetail *task = (myTaskDetail *)[self.Tasks objectAtIndex:indexPath.row];

[cell setTask:task];

return cell;
}



Well, the first issue I had was that I forgot the cast of (myTaskCell *) on the tableView for the dequeueReusableCellWithIdentifier. That threw off a few things in regards to the call to [cell setTask:task] a little further in.


The next issue was in the myTaskCell code itself. Originally, I was just overriding layoutSubviews and crossing my fingers that everything played nicely. That didn't actually didn't go so well. So I did a little research and found this article at the atebits site. So, with a little bit of modification to the myTaskCell code, I switched to using the overriding drawContentView method and low and behold, I now have a blank cell, which is better than the transparent ones I had 20 minutes prior.


Why is my data not displaying? Well it turns out that the font string that I was using was larger than the cell content and when i reduced it from 20 to 14 it seemed to correct the issue. Wallah, text.





- (void)drawContentView:(CGRect)r {

...

normalTextFont = [[UIFont systemFontOfSize:14] retain];
[task.TaskText drawAtPoint:p withFont:normalTextFont];

...
}




So, mostly just putting this out there in hopes that if I run across it again, I have a quick point of reference, or that someone else is able to find it a little more quickly than I was.



Happy Coding!

 

Labels: ,







Tuesday, June 23, 2009

Hide and Seek...?

Where have you been hiding, Mister? Um, yeah. So, I feel like I owe you all an explanation.

Rightly so. Sorry everyone. I've let my audience down. Last time I posted anything was, mid-May? Not a good blogger or social-media head type person, sorry about that guys, I'll try and do better, promise.

So, what, you ask, have I been doing? I've been job hunting primarily. Not having much luck, but this is the way of the market right now. Which leads me to the rest of this entry, the other things I've been doing. ;)

You can't have expected me to sit idle right? So, while not job hunting, I've been enjoying some of my idle time, hanging out with the family, playing with the kids and going to the zoo and museums and the like. I've also started working full steam on a few side projects. One of which I can talk about, one of which I can only hint at.

As you all know, the point of this journal was to document my travels, trials, and headaches as I explored the vast new world that is iPhone development from the viewpoint of a .Net developer. Along those lines, I have begun development on my first commercial development application for the iPhone and I'll be releasing some details about that soon. Along with those details will come more code samples and lessons learned. I haven't forgotten the reason I started this. So stay tuned for more there. There will also be some giveaways for beta test openings for the application to be given away raffle style soon as well.

The other project, while having roots in the open source community is another commercial venture and you will have to get your details and information on it through the official channels I'm afraid. Fun with NDAs. It's pretty exciting and I'm exceptionally pleased to get to work with this awesome team. I've managed to get back into a more formal C++ development role than I've had to maintain in a long time, and I'm enjoying the hell out of the challenges that have been given to me thus far. You all can find out more at AIR:Steampunk, Facebook, MySpace, or follow them on Twitter.

Also, in the next few days, 13 new pieces of art should be hitting the ImageKind gallery for sale. It took me quite a number of hours to get them all finished, polished, refined, and ready for general public consumption, but I think you all will have a good selection of work to choose from now. I like the variety that I will have available on the store once they post. I will have a new post up to announce them formally when I have them up and priced for sales.

Labels: , , ,