I already told you, that I am going to program a little application for the management diabetes blood glucose and insuline injections. Today I finised my first draft of this application. It is pretty basic and does not contain much functionality except entering new entries , deletion of them and also loading and saving of this data. Basically it is a copy of one of the examples found in the „Learning Cocoa with Objective-C“ book. This book is really helpful and should be in the shelf of every Cocoa beginner 🙂
I will publish this little program soon on my homepage javafreedom.org, which is down at the moment, but will be the place for this and other projects I was/am involved in.
I have named the application DiabDiary and hope that this name is not already taken by another software. A screenshot of the main window of the application (remember, this is a very early stage of the software) can be viewed here:
Well, after some long hours in front of my Mac I got to know Objective-C and Cocoa a little better. I am still in the beginning of this for me „new“ language (objective-c) and the framework (Cocoa). I build my first real world window using the Interface Builder delivered by Apple with the XCode toolset.
I browsed quite a couple of websites to the topic and will list some of them here, so that others can also participate on my experiences:
- Cocoabuilder, a pretty nice source for information around Cocoa
- CocoaDevCenter, the place to look at, if you are a Cocoa starter like myself
- MacDevCenter O’Reillys site for Mac developers, pretty slick
- OmniGroup a page from OmniGroup, where they are publishing there frameworks, used in there applications
- SM2DGraphicsFramework, a nice framework for publishing two dimensional graphics in your application.
These links provide some good view into the scene and if you need more, you can always use our friend Google.
Through the blog of LSD I found a pretty nice multi protocol IM for Mac OS X called Adium. Up until now I was using Fire, which is a pretty neat tool for this. I really like the LnF of Adium and I have already set up all my accounts in this tool. Lets see where this is going to lead us 🙂
Oh yeah, I did not told you, that LSD is back in the blogosphere 🙂
I am a java programmer for the last 6 years. In this time, I programmed EJBs, Servlets a couple of specialized eCommerce frameworks like ATG and Intershop. In the current company I moved on to Swing and now I am in the position of a release-/build-engineer. Before my work with Java I was involved in some small projects using PERL and during my university time I had to do some basic programming in C++. Well I don’t want to talk too much about my working life, if you are interested in this, please read my resume. I was also involved in some open source projects, like Depot at apache.org, and also wrote a couple of articles about Java and projects I did with Java (see the list of publications).
Since I bought my eMac, I wanted to write some code with and for it. I think that Cocoa is a pretty nice framework written in Objective-C. Therefor I will now learn this new language. I would like to write a small program with Cocoa for the management of diabetes mellitus, since I am a diabetic anyway. So, I now have a basic idea of what to write, now I have to learn this new framework and do a step back from a language of Java and get used to a C dialect. A good starting point for this seems to be CocoaDevCentral. I will report back, if I have some more experiences and got the development started. BTW, I already coded some very small and simple Applescript programs, one of which you can find in my previous blogs. Now this is a little bit bigger and therefor I need another language. I am probably even coding this stuff using the Cocoa Java binding. Right now I am not really sure. So, let’s see how this is going to work out.
Finally I have created an „alarm clock“ out of my eMac. In the following you will find the script and some short notes about it. Hope you will find it useful. There are actually a lot of other scripts out there, which are mostly Shareware. I just wanted to creat my own little script. It is pretty easy, and I used it to get used to the AppleScript grammar, so don’t expect too much.
One of the pre-requisites this script runs, is an existing „Wakeup“-playlist in your iTunes application.
I will post any updates in this blog 🙂 Also there will be a downloadable version pretty soon.
This short script can be used as an alarm clock with iTunes
– the volume of the system is set to high (0-7), where 7 is high
– the volume of iTunes is set to high (0-100), where 100 is high
– the playlist „Wakeup“ is selected and displayed in the iTunes window
– the playlist property song repeat is set to „repeat all songs“
– the „Wakeup“ playlist is selected
– it begins with the first song in the playlist
Basically every time my computer starts up, it will run this little script, starts up iTunes and plays the first song of the playlist „Wakeup“ with all volume parameters throttled to HIGH
You have to save this script as a program without start dialog and then put it in your start objects. Furthermore, you can then select to startup your computer at any given time in the „System Preferences -> Energy“. If you are using network shares, please make sure, that they are mounted, otherwise you will get trouble.
You should also select to login the user automatically, otherwise this script is pretty useless.
set volume 7
tell application „iTunes“
set sound volume to 100
set the_wakeup_playlist to first user playlist whose name is „Wakeup“
set song repeat of the_wakeup_playlist to all
tell playlist the_wakeup_playlist
tell application „iTunes“
set the view of the front browser window to playlist (name of the_wakeup_playlist)
set play_track to first track of the_wakeup_playlist
set playlist_name to the name of the_wakeup_playlist as string
on error errormsg number errornumber
display dialog errormsg