Archive for the ‘infurious’ Category

iPhone - One Week On (part 1)

Friday, November 16th, 2007

Well the hoopla surrounding the iPhone is now one week old and yes, I was tenth in line to get my grubby little hands on one.

Since I live in Northern Ireland, just North of Belfast, there are no Apple stores over here, or indeed, any part of Ireland full stop. So I just had to make do with the O2 store in CastleCourt, Belfast. There was a small queue forming outside an hour before opening, and it was enough to worry the shop next door, calling security to get the number of people moved away from their doors.

Getting the iPhone in my hands and getting home was filled with an air of great anticipation, something that I though wasn’t going to happen to me. Actually seeing the screen light up after registration was a great relief, especially reading that some people had difficulties. This boys details went through in under 3 minutes.

Now that I’ve had the iPhone for a week now, I’m still very pleased with it. I can quite safely say that this is the first phone where I can use nearly every aspect of it without needing a manual or just plain giving up. In fact it is so simple, my mum was able to operate it and she can’t even get the DVD player to work.

(more…)

Accessing Cocoa from Carbon from Cocoa

Sunday, November 4th, 2007

The title of this blog may take a little explaining.

I was looking to include a Carbon routine within my Cocoa application, but this routine needed to have access to both my instance variables and other Class methods. It is straight forward to use Cocoa commands in your Carbon routine, as long as they’re declared from within the routine itself. You have no access to the object reference “self”. This refers to the object in which your code resides.

In order to achieve this you first need to create an object of the Class method and an instance init method within your Class. Here I have a Class called AppController where my Carbon routine is located. I add the following code;

+ (AppController *) sharedController
{
    return sharedController;
}

- (id) init
{
    self = [super init];
    sharedController = self;

    // Any other initialiser code needed

    return self;
}

Now from within my Carbon routine a new AppController ojbect class is created called controller. I can now use this controller object in place of “self”. This gives me access to all my instance variables and methods.

void MyCarbonRoutine
{
    AppController *controller;
    controller = [[AppController alloc] init];
    [controller aCocoaRoutine];

    // Any other coding needed here

    [controller release];
}

Remember to release your controller object before leaving the Carbon routine or you could end up with all sort of problems.

- Thanks to Uli Kusterer for pointing out that they are Objects that are created and released and not the Classes themselves.

WordPress & Apple Server

Sunday, November 4th, 2007

For those that haven’t noticed, this blog is using Wordpress. This is freely available for download from their website. If like me your using it on a Macintosh server and want to use a feature like Permalink, you may be having problems. The Wordpress documentation describes these as:

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Especially when they are used to link to individual postings, once a story is posted, the URL to it should be permanent, and never change. Hence.. permalink.

This is a really nice feature but the Apache server settings on the Mac are overridden. In order for Permalinks to work you need an “.htacces” file which is a “distributed configuration file”. This provides a way to make configuration changes in each directory. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof. This is needed for these fancy links to work but the Mac Server overrides them.

To fix this problem simply go to the Web option in your ServerAdmin application. Select the website that’s using Wordpress under the Sites toolbar and select Options.

Apache options

Under the Apache options list, ensure that “Allow All Overrides” tick box is checked. This will allow Apache to use your “.htaccess” files and the Permalinks will run as they should.

A blog for blogging

Friday, October 26th, 2007

A few weeks ago the company I’m involved with, infurious, suggested for me to start a blog, and get involved with the whole blog-a-sphere thing. This is my attempt at doing such a thing.

I’m still trying to figure out what sort of items to blog about, creating a few categories to get the old mind going, and plenty of coffee to help remind the old mind to blog. I think that makes sense.

Okay, keep posted.