Sunday, January 31, 2010

Questions...

10:15 PM - 10:30 PM - Did some looking around and it sounds like [CALayer setNeedsDisplay] should be what forces a redraw. Fixed the graph checkbox to turn it on and off.  See this link for more details.

Saturday, January 30, 2010

Day 1, all day Saturday.

9:30 AM to 12:15 PM

Created the sidebar for the drawing editor, called artist. I'll focus on the drawing editor today. You've got to have drawing before you can have the iPad draw! Also did some research on UIBezierPath (new in 3.2, iPad only). Decided that UIBezierPath will make things tons easier, so we will use that and worry about this app being ported to the iPhone/touch later. Determined optimal drawing sizes to be 600x600 and 280x280 for the iPad and phone/touch respectively. If things go well these should be scalable with a little math but better to plan for the actual pixel size at first since I'm a graphics n00b. Also installed accessorizer and did a small amount of forum posting in the beta forums about GPS and UIBezierPath. Also messed around with my iPhone syncing, getting that organized and emailed a friend about waiting on doing a business together. Next lunch, then on to creating the drawing window and making the sidebar work.

12:45 PM: Mmm, reheated pizza. Started work on main drawing window. Fought a bit with creating a suitable view controller attached to the window. I'm such a cocoa n00b still in many ways. Got an email back from a friend that said simply "kk sounds good". I expected differently. I worry too much. I then checked my apple beta forum posts and found that I had been flamed for asking if the 3G version of the iPad really did have a GPS in it. Great.

1:30 PM - 3:30 PM: Researching core graphics/animation so I can actually draw the content in the window like I should. Still working through some of that, but have learned to use CALayers and (I think) add them to the window's view appropriately. To draw dynamically I will still have to use either NSBezierPath or CG drawing techniques. (You can also use static images apparently quite easily). This is Still in progress. Got a response to my UIBezierPath question from an apple rep named rincewind. Here is the quote:
"UIBezierPath basically just wraps around CGPathRef in order to add a bit of state (basically attributes of the path). While useful, it doesn't really provide anything that you don't already have with Quartz, and if you chose to do so you could replicate its functionality entirely with Quartz."

3:30 PM - 5:30 PM: After doing a bunch of CALayer coding I figured out that my window wasn't loading my view controllers as I thought it should be. :/ So, I redid it inside it's own xib file and it's now working. Well, the window is being created properly, but my CALayer code for some reason goes into an infinite loop. Should be enough there to attach four layers, a root layer, a graph layer, a pen drawing layer and an animation layer. Breaking for dinner and to help my poor wife with the kids for a few.


6:30 PM - 8:00 PM:  Starting back in by looking for a CALayer example. After 10 minutes I see I should have done this from the start. see this link for a very good example of CALayer. Too bad this guy doesn't use a delegate method to draw his code. More churning... I found this example also, but I appear to be doing the same thing and my draw code doesn't work. :(

8:15 PM - 9:05 PM: After helping the kids get to bed (in bed not asleep, that takes far longer) I'm still working on the delegate for CALayer not getting called. Work on this for 15 more mins and get it working (move [self setWantsLayer:YES] to the top?) and now the CALayer is constrained into a much smaller space than anticipated. I need a break.

11:45 PM - 1:45 AM: I'm a glutton I guess. Had a 30 minute nap, some food and watched some Heroes. Let's see what we can do in the next few hours... Well, got it working. Nothing groundbreaking, but it appears you shouldn't mix NSBezierPath with the low lvl CG calls, once I took those out (and called NSBezierPath's stroke method) things began to work. Almost to the point of having the grid turn on and off, just have to figure out how to force a refresh on the grid drawing. Better get to bed.

Friday, January 29, 2010

Time

As a quick note, I'm also going to use this blog as a time tracking tool, and maybe show a few developers what they are getting into by following along. For reference... Up until now I've spent the following time, from about January 24th thru January 29th:
4 hours of brainstorming, specs.
1 hour installing the new SDK.
1.5 hours researching (general iPad newness stuff related to this)
1 hour of research into cocos2d.

Here's to hoping this is useful to someone out there.

So it begins

After a month or so of scheming, planning, hand-wringing, indecision and angst, I've begun the process of iPad development in earnest.

This blog will be my journal so to speak, insight into my development process. I'll likely come across looking like the ignorant wannabe coder and self-publisher that I am. However, as my kids like to say, "You get what you get and you don't throw a fit". So it is with you, dear reader. You get what you get.

Today I have created the actual iPad project for my next project codenamed pict. I have a number of other ideas that may or may not actually happen, but we are starting here. Today.

I'll keep you updated.