by Christian Franz
Using Growl with FPC Pascal
by Christian Franz
This is a small demo application that demonstrates how to use "Growl" from within a Pascal (FPC) application. The downloadable zip archive contains the demo app (Intel), and project, along with some info on what it is. The immense size of the archive is simply because it contains the self-contained Growl-With-Installer framework. The actual demo code is about 50 lines of code.
In a nutshell, Growl is a small central process that posts notifications (such as 'A client has connected to the server') for other applications. Growl does a much better job at notifications (the apps don't come to the foreground, no click is required, and the user can selectively enable and disable notifications) than Apple-provided routines.
For a detailed explanation, check out the Growl website at: http://www.growl.info.
Use this link to download the 5.9 MB archive of this demo as a zip file. Unzip the file, and you'll have a "Growltest" folder contained a number of Growl files, project file, pascal files, framework folder, and executable application (requires an Intel Mac to run the sample executable).
Download the Growl Demo
This small application provides two things:
- The necessary interface files for Growl's carbon application bridge
- A small demo app that demonstrates:
- how to register your application with Growl (quite painless)
- how to post three different notifications (no pain at all)
- uses the auto-install option (i.e. it auto-installs Growl on your Mac if it isn't already installed)
- This demo package contains the Growl-With-Installer.framework. You should immediately go to growl.info, and download the most recent one, as there is surely a newer version out.
- The demo works around a small bug in Growl 1.3.1 where the auto-detection of the .growldict doesn't set the delegate correctly. Use this code to be safe; version 1.4.0 should fix this, making Growl integration even simpler.
- I strongly recommend you read Growl's documentation first so you know how to use it ion your application and how to create the required registration plist. All in all, though, Growl is simple to use, and a significant improvement to all applications that either run in the background, or have lengthy tasks. Oh, and Growl is open source.