Blog posts

Aug 14

My first iPhone and iPad apps

Written: Aug 14th 2010, 20:59

After some years away from any Cocoa and Objective-C development (my last build of Worktimer was in 2007) I started looking into the iOS development in November last year. Sadly I was busy writing another web application during the winter, but in this spring and summer I finally was able to submit some apps to AppStore.

Bike Meter was my first app, and its a simple utility to calculate your training zones in cycling. In the other app Surdeig I was trying out the “Universal Application” targeting both iPhone and iPads in a single bundle.

The workflow with iOS apps is nice and pretty stright forward, compared to web-apps where the development process involving everything from server-side, databases, php and frontend stuff like HTHML, CSS and JS. Not to mention the deployment..

Permalink for My first iPhone and iPad apps
Sep 13

Back in the Cocoa business

Written: Sep 13th 2009, 22:30
Hello Polly - screenshot IPhone app

Some years have gone since I wrote the last version of Worktimer, but know I am back in the Mac development business again, working with Objective-C and the Cocoa and UIKit framework.

Permalink for Back in the Cocoa business
Dec 14

Dice Adobe Air application

Written: Dec 14th 2008, 23:45

Had some friends over at my place on saturday and for beer and “Navigare” (like the Monopoly Board Game only on the ocean). Unfortunately the dice was gone.. Well, creating a random thing shouldn’t be that hard on a computer, so I wrote this simple dice application.


Download Dice.air (Adobe Air Application)


Download Dice Source

Permalink for Dice Adobe Air application
Jul 12

New MacBook - How to setup Apache, PHP and MySQL

Written: Jul 12th 2008, 20:32

My new MacBook - closeup

After 3 years with my old Imac, I have finally bought a new MacBook. The screen is tiny, but I guess I will get used to it. I am very exicted, but before any real joy can begin, I need to install all the thing I need for my use as “Webdesigner/Webdeveloper”.

Permalink for New MacBook - How to setup Apache, PHP and MySQL
May 09

Using Flex SDK on mac

Written: May 9th 2008, 14:17

Your first Flex application with TextMate

Adobe recently made Flex opensource. That mean that you don’t have to use their Flex Builder in order to make Flex-apps.

This is a quick intro in how to use Flex with Textmate on mac.

Download the Flex SDK

You can download the Flex SDK from Adobe’s site. Place it whereevery you want, but be sure to make it available in your Path:

/Users/gerhard/.bashrc

export PATH; PATH="/Developer/SDKs/air_sdk/bin/:/Developer/SDKs/flex_sdk_3/bin/:/Developer/Tools:/Developer/Applications:/usr/local/bin:/usr/local/subversion/bin:$PATH"<br>alias flex="mxmlc"

I also added a alias for the compiler, located inside the bin/ dir of the SDK.

Download the TextMate bundle for AS3 and Flex

The ActionScript 3 Bundle and the Flex Bundle can be downloaded from TextMates Repository at: http://macromates.com/svn/Bundles/trunk/Review/Bundles/ (Use the SvnX app for mac to access these). Install this and you are ready to start developing in Flex.

Mini tutorial – your first Flex-app with TextMate

Create a new file in TextMate, and name it FlexTest1.mxml:

&lt;?xml version="1.0"?&gt; <br>&lt;!-- mxml/TriggerCodeExample.mxml --&gt; <br>&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;<br>    &lt;mx:Panel title="My Application" <br>        paddingTop="10" <br>        paddingBottom="10" <br>        paddingLeft="10" <br>        paddingRight="10" <br>    &gt; <br>        &lt;mx:TextArea id="textarea1"/&gt; <br>        &lt;mx:Button label="Submit" click="textarea1.text='Hello World';"/&gt; <br>    &lt;/mx:Panel&gt; <br>&lt;/mx:Application&gt; <br>

The ActionScript 3 bundle will provide you with a buildin “Build (mxmlc)” command, but I prefer just compiling the files direct with Terminal.app:

gersh:~/Desktop/Adobe Flex/HelleWorldFlex gerhard$ mxmlc FlexTest1.mxml<br>Loading configuration file /Developer/SDKs/flex_sdk_3/frameworks/flex-config.xml<br>/Users/gerhard/Desktop/Adobe Flex/HelleWorldFlex/FlexTest1<br>.swf (164508 bytes)<br>gersh:~/Desktop/Adobe Flex/HelleWorldFlex gerhard$ 

If you have installed the last version of flash-player you will be able to open the .swf file in Finder.

Permalink for Using Flex SDK on mac
Nov 05

Leopard Core Data bug affect Worktimer

Written: Nov 5th 2007, 22:01

Last weekend I got a mail from a Worktimer user, concerning a possible bug running Worktimer in the new Mac OS X Leopard. It happens when you open a document, and save it without making any changes. When you reopen the document all your data is lost.

Have been working day and night the last days trying to find the cause, unfortunately without any success. Now it turns out its in Leopard the bug is located, and it has to do with their Core Data framework (that Worktimer use).

Lets stay tune for Software Update from Apple, and meanwhile don’t double-save your document.

Read more about the bug here

Permalink for Leopard Core Data bug affect Worktimer
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 1 of 1