Objective-C Tip: Switch Statements

During one of my sessions of working on the iPhone game. I noticed something very strange within Objective-C.

Continue reading “Objective-C Tip: Switch Statements”

XCode: The Starting Curly Brace

UPDATE: With XCode 4 this process no longer works. There is a tool I found called Snippet Edit. It works really well and it is free.

As I dive deeper into the world of programming for Apple hardware I bring along with me past practices or habits that I must change in order to fit into the Objective-C world. It has been years since I last touched C/C++ and coming from a world of .NET and C#, my first impressions of XCode and Objective-C was basically taking a few steps backwards.

I couldn’t have been more wrong…

Continue reading “XCode: The Starting Curly Brace”

iTunes Error 7: Missing CoreGraphics.dll

So, I get home from work today only to find that iTunes on my windows machine would not start up. I kept getting the message that CoreGraphics.dll was missing and that I should re-install iTunes. I really don’t know HOW this could have happened as I have not installed/uninstalled anything on here.

Continue reading “iTunes Error 7: Missing CoreGraphics.dll”

I’m Back!

So I’ve been neglecting this site for awhile now. For those of you who read this blog, I apologize for being so quiet. I ended up taking up 2 jobs which took up a lot more of my time than I had realized and I didn’t have much time to work on my game much less make any new posts here.

Continue reading “I’m Back!”

C# and the readonly keyword

I came across something interesting today and thought I’d share this small bit of information to the world. While this made me scratch my head for a second or two it really does make sense. In C#, and I assume VB.NET as well, we have the keyword readonly which allows one to initialize a read only variable during declaration or within a constructor. I recently had the situation where I needed to use a readonly but couldn’t figure out the best area to place it, either in my parent class or in each child class created. Being one who believes less code is better I leaned towards just throwing it in my parent class. It turns out though, that a read only variable can ONLY be initialized during its declaration or in the class the read only variable resides in and children classes WILL NOT be allowed to initialize the variable.

Continue reading “C# and the readonly keyword”