The Twenty-Four Hour Movie for Mac OS X is a fully Cocoa-native application developed in Objective-C. The Twenty-Four Hour Movie uses the following Cocoa technologies:
All public classes and methods in the The Twenty-Four Hour Movie codebase are documented comprehensively using the HeaderDoc format. The best way to understand a class’s purpose and functionality is to read its “.h” file, which contains HeaderDoc documentation for the class and its public methods. Documentation for private methods or overridden methods, should you need it, is available in the “.m” file for the class, in basic C block comment syntax.
The Xcode project is split into two targets, the front-end application and the helper tool. The application sits in the user’s Applications folder and allows the user to adjust the desktop settings. The helper tool is installed by the application into the Application Support subfolder, and is launched by the launch agent to change the desktop.
Launch Agent and Helper Tool
The launch agent property list file is generated on first run and installed ~/Library/LaunchAgents folder. This file contains some o the settings (for instance, its relaunch frequency corresponds to the frequency of desktop image changes), while others are stored in the user defaults property list. The launch agent is configured to execute the helper tool.
The helper tool uses the DMDesktopManager class to calculate which image is to be displayed, and then changes the desktop.
Application
The first responder for most application events is DMMainWindowController. This class responds to events from the main window.
The main window contains a drop area for image folders, an NSBox subclass called DMDragDropBox. The drag-drop box delegates its drag-and-drop events to a DMFileDropAreaDelegate instance.
DMLaunchAgentSettings is a KVO-observing class that acts as a Cocoa Bindings front for the launch agent property list. When its key values change, this class writes the new values to the property list file.
Calculating which image should be displayed according to the current time is the work of the DMSequenceManager singleton.
Startup tasks such as initializing value transformers and user default are handled by the DMStartup nib instance.
To learn about
|
Go to
|
---|---|
How to contribute to the The Twenty-Four Hour Movie project |
Add to or modify the code for The Twenty-Four Hour Movie View the license for redistributing modified copies of The Twenty-Four Hour Movie |
The The Twenty-Four Hour Movie project home page |