Blog posts

May 05

Blogging med Technorati

Written: May 5th 2007, 18:06

Sjekk ut min profil på Technorati


Technorati Profile

Permalink for Blogging med Technorati
Apr 28

Min CakePHP blog er klar

Written: Apr 28th 2007, 20:22

Endel timer har det tatt, men nå er endelig den "nybakte" bloggen min ferdig. Har brukt Wordpress i rundt et år, men da jeg begynte å lukte på CakePHP for rundt en måned siden begynte tankene om å skrive min egen blogapplikasjon.

Permalink for Min CakePHP blog er klar
Mar 06

CakePHP: Error baking with bake.php

Written: Mar 6th 2007, 23:20

In the CakePHP (cake_1.1.13.4450.zip) I discovered an bug in bake.php. When trying to bake an model you get this error:


Fatal error: Cannot instantiate non-existent class:  model in /Users/gersh/Sites/cakephp/cake/scripts/bake.php on line 435

When I checked the source I found that these lines was commented out:

Line 131:     uses ('inflector', 'model'.DS.'model');
Line 132:     require_once (CORE_PATH.'cake'.DS.'app_model.php');
Line 133:     require_once (CORE_PATH.'cake'.DS.'app_controller.php');

After removing comments bake.php works just fine!

Permalink for CakePHP: Error baking with bake.php
Dec 13

WorkTimer 2.04 - Fix start problem without internet connection

Written: Dec 13th 2006, 00:03

WorkTimer application icon

I have just made a new update on WorkTimer, which fixes a bug that prevented WorkTimer 2.03 from starting when there was no internet connection. The deal was that I in the previos update did a rather lazy check with no timeout. This caused Worktimer 2.03 to just stagnate when you network was down:


[NSDictionary dictionaryWithContentsOfURL: (NSURL *)internetURL];

The fix


It was easier then I tought, after just 2 min at the great Cocoabuilder.com a found this snipplet that creates a thread that do the internet checking by it self.


The main application thread is left untouched:


- (IBAction) checkVersion: (id) sender {
[NSThread detachNewThreadSelector: @selector(checkVersionInThread:)
toTarget: self withObject: sender];
}

- (void) checkVersionInThread: (id) sender {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

NSDictionary *versionDict = [NSDictionary
dictionaryWithContentsOfURL: versionsURL];
if (versionDict != nil) {
// do stuff
} else {
NSLog(@“Unable to download version information.”);
}

[pool release];
[NSThread exit];
}

Permalink for WorkTimer 2.04 - Fix start problem without internet connection

Page 4 of 4

<< previous | 1 | 2 | 3 | 4 |

next >>