About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Home » Learning Curve » Red Hat Diaries

Apple, 陰陽, and the Power of Love

クランチのクランチ。
 - 富士通


Buy It

Try It

愛の力。上でからの力。
 - wジョンソン*

Yin Yang: it's become the single most ubiquitous secret code symbol of Apple Inc. It's everywhere. It's in their 'universal' logo. And it's in more and more icons. And it's in toolbar buttons as well. In combo boxes. In push buttons. In scroll bar thumbs and arrows. In table view and outline view headers. In the menu bar.

It's bloody everywhere.

Maybe it all started back with Safari. That's years ago. Safari came out with an entirely new look not integrated into the environment. Everything was hot wired. Especially the toolbar was new. This was not standard NeXTSTEP NSToolbar. NSToolbar is lugubrious enough but this was more so. Nothing is automated - everything requires code of its own, used one time only, in an environment that prides itself on code and object reuse.

Here's the Tiger NSToolbar header file. It's copyrighted and last updated three years ago.

/*
    NSToolbar.h
    Application Kit
    Copyright (c) 2000-2004, Apple Computer, Inc.
    All rights reserved.
*/

#import <Foundation/Foundation.h>
#import <AppKit/AppKitDefines.h>

@class NSToolbarItem;
@class NSWindow;
@class NSString;
@class NSMutableArray;

typedef enum { NSToolbarDisplayModeDefault, NSToolbarDisplayModeIconAndLabel, NSToolbarDisplayModeIconOnly, NSToolbarDisplayModeLabelOnly } NSToolbarDisplayMode;
typedef enum { NSToolbarSizeModeDefault, NSToolbarSizeModeRegular, NSToolbarSizeModeSmall } NSToolbarSizeMode;

@interface NSToolbar : NSObject {
@private
    NSString *			_toolbarIdentifier;

    NSMutableArray *		_currentItems;
    NSMutableArray *		_currentItemIdentifiers;

    NSDictionary *		_initPListDatabase;
    id				_initPListTarget;

    NSString *			_selectedItemIdentifier;
    void *			_metrics;

    id				_delegate;
    NSWindow *			_window;
    id				_configPalette;
    id 				_toolbarView;
    int				_syncPostEnabledCount;

    struct __tbFlags {
	unsigned int allowsUserCustomization:1;
	unsigned int autosavesUsingIdentifier:1;
	unsigned int initialConfigurationDone:1;
	unsigned int shouldHideAfterCustomization:1;
        unsigned int delegateDefaultItemIdentifiers:1;
        unsigned int delegateAllowedItemIdentifiers:1;
        unsigned int delegateItemWithItemIdentifier:1;
	unsigned int delegateNotificationsEnabled:1;
        unsigned int prefersToBeShown:1;
        unsigned int loadItemsImmediately:1;
        unsigned int currentItemsContainsPlaceholder:1;
        unsigned int customizationPanelIsRunning:1;
        unsigned int usesCustomSheetWidth:1;
        unsigned int clickAndDragPerformsCustomization:1;
        unsigned int showsNoContextMenu:1;
        unsigned int firstMoveableItemIndex:6;
        unsigned int keyboardLoopNeedsUpdating:1;
        unsigned int showHideDuringConfigurationChangeDisabled:1;
	unsigned int displayMode:2;
	unsigned int sizeMode:2;
	unsigned int doNotShowBaselineSeparator:1;
        unsigned int hideWithoutResizingWindowHint:1;
        unsigned int autovalidatesItemsDisabled:1;
        unsigned int inAutovalidation:1;
	unsigned int loadedMetrics:1;
    } _tbFlags;

    int				_customizationSheetWidth;
    id				_tbReserved;
}

- (id)initWithIdentifier:(NSString *)identifier;
    /* The identifier is used to form the toolbar's autosave name.  Also, toolbars with the same identifier are implicitly synchronized so that they maintain the same state. */

- (void)insertItemWithItemIdentifier:(NSString *)itemIdentifier atIndex:(int)index;
- (void)removeItemAtIndex:(int)index;
    /* Primitives for explicitly adding and removing items.  Any change made will be propogated immediately to all other toolbars with the same identifier. */

- (void)setDelegate:(id)delegate;
- (id)delegate;
    /* Customizable toolbars must have a delegate, and must implement the required NSToolbarDelegate methods. */

- (void)setVisible:(BOOL)shown;
- (BOOL)isVisible;
    /* toggles the visibliity of the toolbar. */

- (void)runCustomizationPalette:(id)sender;
- (BOOL)customizationPaletteIsRunning;
    /* Customizable toolbars (those with delegates) can show a palette which allows users to populate the toolbar with individual items or to reset the toolbar to some default set of items.  The items and item sets in the palette are specified by the delegate (-toolbarAllowedItemIdentifiers: and -toolbarDefaultItemIdentifiers:).  When the user is done configuring, they will dismiss the palette. */


// ----- Toolbar Attributes  -----

- (void)setDisplayMode:(NSToolbarDisplayMode)displayMode;
- (NSToolbarDisplayMode)displayMode;

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- (void)setSelectedItemIdentifier:(NSString *)itemIdentifier;
- (NSString *)selectedItemIdentifier;
    /* Sets the toolbar's selected item by identifier.  Use this to force an item identifier to be selected.  Toolbar manages selection of image items automatically.  This method can be used to select identifiers of custom view items, or to force a selection change.  (see toolbarSelectableItemIdentifiers: delegate method for more details). */
#endif

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
- (void)setSizeMode:(NSToolbarSizeMode)sizeMode;
- (NSToolbarSizeMode)sizeMode;
#endif

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
/* Use this API to hide the baseline NSToolbar draws between itself and the main window contents.  The default is YES.  This method should only be used before the toolbar is attached to its window (-[NSWindow setToolbar:]).
*/
- (void)setShowsBaselineSeparator:(BOOL)flag;
- (BOOL)showsBaselineSeparator;
#endif

- (void)setAllowsUserCustomization:(BOOL)allowCustomization;
- (BOOL)allowsUserCustomization;
    /* This flag controls whether or not users can configure the toolbar by dragging items around, and whether or not the customization palette can be used.  The default value is NO, but can be changed at any time.  For instance, a developer may not want users to be able to edit the toolbar while some event is being processed.  */


// ----- Accessing toolbar info -----

- (NSString *)identifier;
    /* All toolbars with the same name will share the same display attributes, and item order.  Also, if a toolbar autosaves its configuration, the item identifier will be used as the autosave name. */

- (NSArray *)items;
    /* Allows you to access all current items in the toolbar. */

- (NSArray *)visibleItems;
    /* Allows you to access the current visible items (non clipped). */


// ----- Autosaving The Configuration -----

- (void)setAutosavesConfiguration:(BOOL)flag;
- (BOOL)autosavesConfiguration;
    /* If autosavesConfiguration is YES, the toolbar will automatically write changes the user makes to user defaults.  Customizable toolbars will want to set this flag to YES.  Setting this to NO means changes in configuration are not written automatically, however you can use the configurationDictionary method to do it yourself.  Default is NO. */

- (void)setConfigurationFromDictionary:(NSDictionary *)configDict;
- (NSDictionary *)configurationDictionary;
    /* Set and get the current toolbar configuration using a dictionary representation. */


// ----- Validation of the items -----

- (void)validateVisibleItems;
    /* Typically you should not invoke this method.  This method is called on window updates with the purpose of validating
each of the visible items.  The toolbar will iterate through the list of visible items, sending each a -validate message. */

@end

@interface NSObject (NSToolbarDelegate)

- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag;
    /* Required method.  Given an item identifier, this method returns an item.  Note that, it is expected that each toolbar receives its own distinct copies.   If the item has a custom view, that view should be in place when the item is returned.  Finally, do not assume the returned item is going to be added as an active item in the toolbar.  In fact, the toolbar may ask for items here in order to construct the customization palette (it makes copies of the returned items).  if willBeInsertedIntoToolbar is YES, the returned item will be inserted, and you can expect toolbarWillAddItem: is about to be posted.  */

- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar;
    /* Required method.  Returns the ordered list of items to be shown in the toolbar by default.   If during initialization, no overriding values are found in the user defaults, or if the user chooses to revert to the default items this set will be used. */

- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar;
    /* Required method.  Returns the list of all allowed items by identifier.  By default, the toolbar does not assume any items are allowed, even the separator.  So, every allowed item must be explicitly listed.  The set of allowed items is used to construct the customization palette.  The order of items does not necessarily guarantee the order of appearance in the palette.  At minimum, you should return the default item list.*/

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar;
    /* Optional method. Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers.  If implemented, the toolbar will remember and display the selected item with a special highlight.  A selected item is one whose item identifier matches the current selected item identifier.  Clicking on an item whose identifier is selectable will automatically update the toolbars selected item identifier when possible. (see setSelectedItemIdentifier: for more details) */
#endif

@end


@interface NSObject (NSToolbarNotifications)

- (void)toolbarWillAddItem: (NSNotification *)notification;
    /* Before an new item is added to the toolbar, this notification is posted.  This is the best place to notice a new item is going into the toolbar.  For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it.   The notification object is the toolbar to which the item is being added.  The item being added is found by referencing the @"item" key in the userInfo.  */

- (void)toolbarDidRemoveItem: (NSNotification *)notification;
    /* After an item is removed from a toolbar the notification is sent.  This allows the chance to tear down information related to the item that may have been cached.  The notification object is the toolbar to which the item is being added.  The item being added is found by referencing the @"item" key in the userInfo.  */

@end


/* Notifications */
APPKIT_EXTERN NSString *NSToolbarWillAddItemNotification;
APPKIT_EXTERN NSString *NSToolbarDidRemoveItemNotification;

Safari

There are 138 TIFFs in Safari.app/Contents/Resources for a total of 165472 bytes. Effectively 596 KB because of clustering. Each of those 138 images has to be loaded separately.

Ask for the image; find it on disk; wait for the disk to spin into position; whisk it up. On to the next one. All 138 of them. Just to load the bloody program.

And Safari still loads pretty fast. Not as fast as it used to but still pretty fast. And it's a native application as opposed to Firefox - it's supposed to be faster. Leaner. Meaner.

138 items, 165472 bytes, 1192 blocks, 0 bytes in extended attributes.

/Applications/Safari.app/Contents/Resources/Activity_Stop.tif
/Applications/Safari.app/Contents/Resources/AddLink.tif
/Applications/Safari.app/Contents/Resources/AddLinkDisabled.tif
/Applications/Safari.app/Contents/Resources/AddLinkPressed.tif
/Applications/Safari.app/Contents/Resources/AddressBook.tiff
/Applications/Safari.app/Contents/Resources/AdvancedPreferences.tiff
/Applications/Safari.app/Contents/Resources/AppearancePreferences.tiff
/Applications/Safari.app/Contents/Resources/Autofill.tif
/Applications/Safari.app/Contents/Resources/AutofillDisabled.tif
/Applications/Safari.app/Contents/Resources/AutoFillPreferences.tiff
/Applications/Safari.app/Contents/Resources/AutofillPressed.tif
/Applications/Safari.app/Contents/Resources/AutoTabMarker.tif
/Applications/Safari.app/Contents/Resources/AutoTabMarkerWhite.tif
/Applications/Safari.app/Contents/Resources/Back.tif
/Applications/Safari.app/Contents/Resources/BackDisabled.tif
/Applications/Safari.app/Contents/Resources/BackPressed.tif
/Applications/Safari.app/Contents/Resources/BookmarkPreferences.tiff
/Applications/Safari.app/Contents/Resources/BookmarksButton.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Locked.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Locked_Pressed.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Locked_Rollover.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Pressed.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Rollover.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Selected.tif
/Applications/Safari.app/Contents/Resources/BookmarksButton_Selected_Pressed.tif
/Applications/Safari.app/Contents/Resources/BookmarksDragBadge1-2.tif
/Applications/Safari.app/Contents/Resources/BookmarksDragBadge3.tif
/Applications/Safari.app/Contents/Resources/BookmarksDragBadge4.tif
/Applications/Safari.app/Contents/Resources/BookmarksDragBadge5.tif
/Applications/Safari.app/Contents/Resources/BookmarksDragImage.tif
/Applications/Safari.app/Contents/Resources/Bug_Report.tif
/Applications/Safari.app/Contents/Resources/Bug_Report_Pressed.tif
/Applications/Safari.app/Contents/Resources/ClipIndicator.tif
/Applications/Safari.app/Contents/Resources/ClipIndicatorPressed.tif
/Applications/Safari.app/Contents/Resources/DotMac.tif
/Applications/Safari.app/Contents/Resources/DownloadResume.tif
/Applications/Safari.app/Contents/Resources/DownloadResume_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadResumePressed.tif
/Applications/Safari.app/Contents/Resources/DownloadResumePressed_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadResumeRollover.tif
/Applications/Safari.app/Contents/Resources/DownloadResumeRollover_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadReveal.tif
/Applications/Safari.app/Contents/Resources/DownloadReveal_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadRevealPressed.tif
/Applications/Safari.app/Contents/Resources/DownloadRevealPressed_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadRevealRollover.tif
/Applications/Safari.app/Contents/Resources/DownloadRevealRollover_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadStop.tif
/Applications/Safari.app/Contents/Resources/DownloadStop_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadStopPressed.tif
/Applications/Safari.app/Contents/Resources/DownloadStopPressed_Selected.tif
/Applications/Safari.app/Contents/Resources/DownloadStopRollover.tif
/Applications/Safari.app/Contents/Resources/DownloadStopRollover_Selected.tif
/Applications/Safari.app/Contents/Resources/error-border-e.tif
/Applications/Safari.app/Contents/Resources/error-border-n.tif
/Applications/Safari.app/Contents/Resources/error-border-ne.tif
/Applications/Safari.app/Contents/Resources/error-border-nw.tif
/Applications/Safari.app/Contents/Resources/error-border-s.tif
/Applications/Safari.app/Contents/Resources/error-border-se.tif
/Applications/Safari.app/Contents/Resources/error-border-sw.tif
/Applications/Safari.app/Contents/Resources/error-border-w.tif
/Applications/Safari.app/Contents/Resources/error-page-icon.tif
/Applications/Safari.app/Contents/Resources/ErrorPageHelpButton.tif
/Applications/Safari.app/Contents/Resources/FavoriteDrag_Caps.tif
/Applications/Safari.app/Contents/Resources/FavoriteDrag_Middle.tif
/Applications/Safari.app/Contents/Resources/FavoritePressed_Caps.tif
/Applications/Safari.app/Contents/Resources/FavoritePressed_Middle.tif
/Applications/Safari.app/Contents/Resources/FavoriteRollover_Caps.tif
/Applications/Safari.app/Contents/Resources/FavoriteRollover_Middle.tif
/Applications/Safari.app/Contents/Resources/FavoritesBar.tif
/Applications/Safari.app/Contents/Resources/FavoritesFolderArrow.tif
/Applications/Safari.app/Contents/Resources/FavoritesFolderArrowWhite.tif
/Applications/Safari.app/Contents/Resources/folder16.tiff
/Applications/Safari.app/Contents/Resources/FontBigger.tif
/Applications/Safari.app/Contents/Resources/FontBiggerDisabled.tif
/Applications/Safari.app/Contents/Resources/FontBiggerPressed.tif
/Applications/Safari.app/Contents/Resources/FontSmaller.tif
/Applications/Safari.app/Contents/Resources/FontSmallerDisabled.tif
/Applications/Safari.app/Contents/Resources/FontSmallerPressed.tif
/Applications/Safari.app/Contents/Resources/Forward.tif
/Applications/Safari.app/Contents/Resources/ForwardDisabled.tif
/Applications/Safari.app/Contents/Resources/ForwardPressed.tif
/Applications/Safari.app/Contents/Resources/GeneralPreferences.tiff
/Applications/Safari.app/Contents/Resources/HideRSSButton.tif
/Applications/Safari.app/Contents/Resources/HideRSSButton_Pressed.tif
/Applications/Safari.app/Contents/Resources/History.tif
/Applications/Safari.app/Contents/Resources/Home.tif
/Applications/Safari.app/Contents/Resources/HomeDisabled.tif
/Applications/Safari.app/Contents/Resources/HomePressed.tif
/Applications/Safari.app/Contents/Resources/LibrarySelection.tif
/Applications/Safari.app/Contents/Resources/LibrarySelectionGray.tif
/Applications/Safari.app/Contents/Resources/Location_Left.tif
/Applications/Safari.app/Contents/Resources/Location_Left_Progress.tif
/Applications/Safari.app/Contents/Resources/Location_Middle.tif
/Applications/Safari.app/Contents/Resources/Location_Middle_Progress.tif
/Applications/Safari.app/Contents/Resources/Location_Right.tif
/Applications/Safari.app/Contents/Resources/Location_Right_Progress.tif
/Applications/Safari.app/Contents/Resources/NewFolder.tif
/Applications/Safari.app/Contents/Resources/NewFolder_Disabled.tif
/Applications/Safari.app/Contents/Resources/NewFolder_Pressed.tif
/Applications/Safari.app/Contents/Resources/OpenInDashboard.tif
/Applications/Safari.app/Contents/Resources/OpenInDashboardDisabled.tif
/Applications/Safari.app/Contents/Resources/OpenInDashboardPressed.tif
/Applications/Safari.app/Contents/Resources/PlasticButton_Caps.tif
/Applications/Safari.app/Contents/Resources/PlasticButton_Middle.tif
/Applications/Safari.app/Contents/Resources/PlasticButtonPressed_Caps.tif
/Applications/Safari.app/Contents/Resources/PlasticButtonPressed_Middle.tif
/Applications/Safari.app/Contents/Resources/Print.tif
/Applications/Safari.app/Contents/Resources/PrintDisabled.tif
/Applications/Safari.app/Contents/Resources/PrintPressed.tif
/Applications/Safari.app/Contents/Resources/Reload.tif
/Applications/Safari.app/Contents/Resources/ReloadDisabled.tif
/Applications/Safari.app/Contents/Resources/ReloadPressed.tif
/Applications/Safari.app/Contents/Resources/rendezvous.tiff
/Applications/Safari.app/Contents/Resources/RSSPreferences.tiff
/Applications/Safari.app/Contents/Resources/RSSProxyImage.tif
/Applications/Safari.app/Contents/Resources/Search_SnapBack.tif
/Applications/Safari.app/Contents/Resources/Search_SnapBackPressed.tif
/Applications/Safari.app/Contents/Resources/SecurityPreferences.tiff
/Applications/Safari.app/Contents/Resources/ShowRSSButton.tif
/Applications/Safari.app/Contents/Resources/ShowRSSButton_Pressed.tif
/Applications/Safari.app/Contents/Resources/SlidingShadow.tif
/Applications/Safari.app/Contents/Resources/Stop.tif
/Applications/Safari.app/Contents/Resources/StopDisabled.tif
/Applications/Safari.app/Contents/Resources/StopPressed.tif
/Applications/Safari.app/Contents/Resources/TabBevel_Caps.tif
/Applications/Safari.app/Contents/Resources/TabBevel_Middle.tif
/Applications/Safari.app/Contents/Resources/TabClose_Back.tif
/Applications/Safari.app/Contents/Resources/TabClose_Back_Pressed.tif
/Applications/Safari.app/Contents/Resources/TabClose_Back_Rollover.tif
/Applications/Safari.app/Contents/Resources/TabClose_Front.tif
/Applications/Safari.app/Contents/Resources/TabClose_Front_Pressed.tif
/Applications/Safari.app/Contents/Resources/TabClose_Front_Rollover.tif
/Applications/Safari.app/Contents/Resources/TabMask_Caps.tif
/Applications/Safari.app/Contents/Resources/TabMask_Middle.tif
/Applications/Safari.app/Contents/Resources/TabsPreferences.tiff
/Applications/Safari.app/Contents/Resources/tiny_menu.tiff
/Applications/Safari.app/Contents/Resources/TinyAlert.tif

Safari's Tiger image is just over 2 MB. Meaning about 1 MB per CPU architecture. Meaning all things considered the poor program struggles longer and harder to load its bloody toolbar and other images than it does loading its executable code.

[This because the greatest arbiter is not file size but the median access time. You count the cylinders - not the clusters. Ed.]

Apple Mail

Amongst standard system apps Safari is but a pretender to the throne - Apple Mail is the undisputed queen. There are 274 TIFFs in Mail.app/Contents/Resources for a total of 482836 bytes. Effectively 1.4 MB because of clustering. Each of those 274 images has to be loaded separately.

Ask for the image; find it on disk; wait for the disk to spin into position; whisk it up. On to the next one. All 274 of them. Just to load the bloody program.

And this isn't counting all the other resources that have to be loaded. Still wondering why it takes a fortnight to load Apple Mail?

274 items, 482836 bytes, 2696 blocks, 0 bytes in extended attributes.

/Applications/Mail.app/Contents/Resources/AccountPreferences.tiff
/Applications/Mail.app/Contents/Resources/Action.tiff
/Applications/Mail.app/Contents/Resources/Action_Pressed.tiff
/Applications/Mail.app/Contents/Resources/ActionOrNewMBoxHidden.tiff
/Applications/Mail.app/Contents/Resources/Add.tiff
/Applications/Mail.app/Contents/Resources/Add_Pressed.tiff
/Applications/Mail.app/Contents/Resources/AddMailbox.tiff
/Applications/Mail.app/Contents/Resources/AddMailbox_Pressed.tiff
/Applications/Mail.app/Contents/Resources/alphaPixel.tiff
/Applications/Mail.app/Contents/Resources/attachment.tiff
/Applications/Mail.app/Contents/Resources/attachment_header.tiff
/Applications/Mail.app/Contents/Resources/attachmentSelected.tiff
/Applications/Mail.app/Contents/Resources/AvailableProxy.tiff
/Applications/Mail.app/Contents/Resources/button_fill_dark.tiff
/Applications/Mail.app/Contents/Resources/button_fill_light.tiff
/Applications/Mail.app/Contents/Resources/button_separator_dark.tiff
/Applications/Mail.app/Contents/Resources/button_separator_left_dark.tiff
/Applications/Mail.app/Contents/Resources/button_separator_left_light.tiff
/Applications/Mail.app/Contents/Resources/button_separator_light.tiff
/Applications/Mail.app/Contents/Resources/button_separator_right_dark.tiff
/Applications/Mail.app/Contents/Resources/button_separator_right_light.tiff
/Applications/Mail.app/Contents/Resources/ButtonBorder.tiff
/Applications/Mail.app/Contents/Resources/Card.tiff
/Applications/Mail.app/Contents/Resources/Caution.tiff
/Applications/Mail.app/Contents/Resources/certificate.tiff
/Applications/Mail.app/Contents/Resources/Compose_Action.tiff
/Applications/Mail.app/Contents/Resources/Compose_Action_Inactive.tiff
/Applications/Mail.app/Contents/Resources/Compose_Action_Pressed.tiff
/Applications/Mail.app/Contents/Resources/ComposingPreferences.tiff
/Applications/Mail.app/Contents/Resources/connectionStatus.tiff
/Applications/Mail.app/Contents/Resources/connectionStatus_pressed.tiff
/Applications/Mail.app/Contents/Resources/connectionStatus_rollover.tiff
/Applications/Mail.app/Contents/Resources/connectionStatus_selected.tiff
/Applications/Mail.app/Contents/Resources/connectionStatusLarge.tiff
/Applications/Mail.app/Contents/Resources/connectionStatusLarge_pressed.tiff
/Applications/Mail.app/Contents/Resources/connectionStatusLarge_rollover.tiff
/Applications/Mail.app/Contents/Resources/connectionStatusLarge_selected.tiff
/Applications/Mail.app/Contents/Resources/delete.tiff
/Applications/Mail.app/Contents/Resources/deliver.tiff
/Applications/Mail.app/Contents/Resources/DisclosureDownNormal.tiff
/Applications/Mail.app/Contents/Resources/DisclosureDownPressed.tiff
/Applications/Mail.app/Contents/Resources/DisclosureRightDown.tiff
/Applications/Mail.app/Contents/Resources/DisclosureRightNormal.tiff
/Applications/Mail.app/Contents/Resources/DisclosureRightPressed.tiff
/Applications/Mail.app/Contents/Resources/DotMac.tiff
/Applications/Mail.app/Contents/Resources/DraftsMailbox.tiff
/Applications/Mail.app/Contents/Resources/DraftsMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/drag.tiff
/Applications/Mail.app/Contents/Resources/dragBadge1-2.tiff
/Applications/Mail.app/Contents/Resources/dragBadge3.tiff
/Applications/Mail.app/Contents/Resources/dragBadge4.tiff
/Applications/Mail.app/Contents/Resources/dragBadge5.tiff
/Applications/Mail.app/Contents/Resources/Encrypted.tiff
/Applications/Mail.app/Contents/Resources/Encrypted_Glyph.tiff
/Applications/Mail.app/Contents/Resources/Encrypted_Pressed.tiff
/Applications/Mail.app/Contents/Resources/encryption.tiff
/Applications/Mail.app/Contents/Resources/Encryption_Off.tiff
/Applications/Mail.app/Contents/Resources/Encryption_Off_Pressed.tiff
/Applications/Mail.app/Contents/Resources/English.lproj/stopSign.tiff
/Applications/Mail.app/Contents/Resources/find.tiff
/Applications/Mail.app/Contents/Resources/flagged.tiff
/Applications/Mail.app/Contents/Resources/flagged_header.tiff
/Applications/Mail.app/Contents/Resources/FlatLeftcap.tiff
/Applications/Mail.app/Contents/Resources/FlatLeftcap_Pressed.tiff
/Applications/Mail.app/Contents/Resources/FlatMiddlecap.tiff
/Applications/Mail.app/Contents/Resources/FlatMiddlecap_Pressed.tiff
/Applications/Mail.app/Contents/Resources/FlatRightcap.tiff
/Applications/Mail.app/Contents/Resources/FlatRightcap_Graphite.tiff
/Applications/Mail.app/Contents/Resources/FlatRightcap_Graphite_Pressed.tiff
/Applications/Mail.app/Contents/Resources/FlatRightcap_Inactive.tiff
/Applications/Mail.app/Contents/Resources/FlatRightcap_Pressed.tiff
/Applications/Mail.app/Contents/Resources/FontsAndColorsPreferences.tiff
/Applications/Mail.app/Contents/Resources/Forward_Normal.tiff
/Applications/Mail.app/Contents/Resources/Forward_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Forward_Rollover.tiff
/Applications/Mail.app/Contents/Resources/Forward_White_Normal.tiff
/Applications/Mail.app/Contents/Resources/Forward_White_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Forward_White_Rollover.tiff
/Applications/Mail.app/Contents/Resources/French.lproj/stopSign.tiff
/Applications/Mail.app/Contents/Resources/GeneralPreferences.tiff
/Applications/Mail.app/Contents/Resources/GenericAccount.tiff
/Applications/Mail.app/Contents/Resources/GenericAccountLarge.tiff
/Applications/Mail.app/Contents/Resources/getNewMail.tiff
/Applications/Mail.app/Contents/Resources/grayLine.tiff
/Applications/Mail.app/Contents/Resources/highPriority.tiff
/Applications/Mail.app/Contents/Resources/HighPriority_Inactive.tiff
/Applications/Mail.app/Contents/Resources/highPriority_menu.tiff
/Applications/Mail.app/Contents/Resources/highPriority_menu_selected.tiff
/Applications/Mail.app/Contents/Resources/HighPriority_Popup.tiff
/Applications/Mail.app/Contents/Resources/HighPriority_Popup_Graphite.tiff
/Applications/Mail.app/Contents/Resources/HighPriority_Popup_Pressed_Graphite.tiff
/Applications/Mail.app/Contents/Resources/HighPriority_Pressed.tiff
/Applications/Mail.app/Contents/Resources/InMailbox.tiff
/Applications/Mail.app/Contents/Resources/InMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/InvalidDataIcon.tiff
/Applications/Mail.app/Contents/Resources/junkmail.tiff
/Applications/Mail.app/Contents/Resources/junkMailFlag.tiff
/Applications/Mail.app/Contents/Resources/left_button_cap_dark.tiff
/Applications/Mail.app/Contents/Resources/left_button_cap_light.tiff
/Applications/Mail.app/Contents/Resources/loadImages.tiff
/Applications/Mail.app/Contents/Resources/LocalAccount.tiff
/Applications/Mail.app/Contents/Resources/LocalAccountLarge.tiff
/Applications/Mail.app/Contents/Resources/LowPriority.tiff
/Applications/Mail.app/Contents/Resources/LowPriority_Inactive.tiff
/Applications/Mail.app/Contents/Resources/lowPriority_menu.tiff
/Applications/Mail.app/Contents/Resources/lowPriority_menu_selected.tiff
/Applications/Mail.app/Contents/Resources/LowPriority_Popup_Graphite.tiff
/Applications/Mail.app/Contents/Resources/LowPriority_Popup_Pressed_Graphite.tiff
/Applications/Mail.app/Contents/Resources/LowPriority_Pressed.tiff
/Applications/Mail.app/Contents/Resources/MacAccount.tiff
/Applications/Mail.app/Contents/Resources/MacAccountLarge.tiff
/Applications/Mail.app/Contents/Resources/Mail_Large.tiff
/Applications/Mail.app/Contents/Resources/mailboxSelectionBackground.tiff
/Applications/Mail.app/Contents/Resources/mailboxSelectionBackgroundFocus.tiff
/Applications/Mail.app/Contents/Resources/mailboxSelectionBackgroundFocusSmall.tif
/Applications/Mail.app/Contents/Resources/mailboxSelectionBackgroundSmall.tif
/Applications/Mail.app/Contents/Resources/MailboxViewSpacer.tiff
/Applications/Mail.app/Contents/Resources/MailSorter.tiff
/Applications/Mail.app/Contents/Resources/mainSplitterBar.tiff
/Applications/Mail.app/Contents/Resources/mainSplitterDimple.tiff
/Applications/Mail.app/Contents/Resources/menuIndicator.tiff
/Applications/Mail.app/Contents/Resources/newMailBadge1&2.tiff
/Applications/Mail.app/Contents/Resources/newMailBadge3.tiff
/Applications/Mail.app/Contents/Resources/newMailBadge4.tiff
/Applications/Mail.app/Contents/Resources/newMailBadge5.tiff
/Applications/Mail.app/Contents/Resources/NewPerson.tiff
/Applications/Mail.app/Contents/Resources/NormalMailbox.tiff
/Applications/Mail.app/Contents/Resources/NormalMailbox_ContainerOnly.tiff
/Applications/Mail.app/Contents/Resources/NormalMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/NormalMailboxLarge_ContainerOnly.tiff
/Applications/Mail.app/Contents/Resources/NormalPriority.tiff
/Applications/Mail.app/Contents/Resources/NormalPriority_Inactive.tiff
/Applications/Mail.app/Contents/Resources/normalPriority_menu.tiff
/Applications/Mail.app/Contents/Resources/normalPriority_menu_selected.tiff
/Applications/Mail.app/Contents/Resources/NormalPriority_Popup_Graphite.tiff
/Applications/Mail.app/Contents/Resources/NormalPriority_Popup_Pressed_Graphite.tiff
/Applications/Mail.app/Contents/Resources/NormalPriority_Pressed.tiff
/Applications/Mail.app/Contents/Resources/offlineAlert.tiff
/Applications/Mail.app/Contents/Resources/offlineAlert_clicked.tiff
/Applications/Mail.app/Contents/Resources/offlineAlert_highlighted.tiff
/Applications/Mail.app/Contents/Resources/offlineAlert_selected.tiff
/Applications/Mail.app/Contents/Resources/offlineAlertLarge.tiff
/Applications/Mail.app/Contents/Resources/offlineAlertLarge_clicked.tiff
/Applications/Mail.app/Contents/Resources/offlineAlertLarge_highlighted.tiff
/Applications/Mail.app/Contents/Resources/offlineAlertLarge_selected.tiff
/Applications/Mail.app/Contents/Resources/OnlineStatusListHeader.tiff
/Applications/Mail.app/Contents/Resources/OptionChecked.tiff
/Applications/Mail.app/Contents/Resources/OptionUnchecked.tiff
/Applications/Mail.app/Contents/Resources/OutMailbox.tiff
/Applications/Mail.app/Contents/Resources/OutMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/PopDownArrow.tiff
/Applications/Mail.app/Contents/Resources/QuestionMark.tiff
/Applications/Mail.app/Contents/Resources/QuotaBarBase.tiff
/Applications/Mail.app/Contents/Resources/RankCell.tiff
/Applications/Mail.app/Contents/Resources/redirected.tiff
/Applications/Mail.app/Contents/Resources/redirectedSelected.tiff
/Applications/Mail.app/Contents/Resources/redlight.tiff
/Applications/Mail.app/Contents/Resources/Remove.tiff
/Applications/Mail.app/Contents/Resources/Remove_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Reply_Normal.tiff
/Applications/Mail.app/Contents/Resources/Reply_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Reply_Rollover.tiff
/Applications/Mail.app/Contents/Resources/Reply_White_Normal.tiff
/Applications/Mail.app/Contents/Resources/Reply_White_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Reply_White_Rollover.tiff
/Applications/Mail.app/Contents/Resources/right_button_cap_dark.tiff
/Applications/Mail.app/Contents/Resources/right_button_cap_light.tiff
/Applications/Mail.app/Contents/Resources/saveAsDraft.tiff
/Applications/Mail.app/Contents/Resources/scriptMenu.tiff
/Applications/Mail.app/Contents/Resources/SearchSliceViewBackground.tiff
/Applications/Mail.app/Contents/Resources/SearchSliceViewSeperator.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-PressedFill.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-PressedL.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-PressedR.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-RolloverFill.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-RolloverL.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-RolloverR.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-SelectedFill.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-SelectedL.tiff
/Applications/Mail.app/Contents/Resources/SearchTypeButton-SelectedR.tiff
/Applications/Mail.app/Contents/Resources/senders.tiff
/Applications/Mail.app/Contents/Resources/separator.tiff
/Applications/Mail.app/Contents/Resources/Signature.tiff
/Applications/Mail.app/Contents/Resources/Signature_Off.tiff
/Applications/Mail.app/Contents/Resources/Signature_Off_Pressed.tiff
/Applications/Mail.app/Contents/Resources/Signed.tiff
/Applications/Mail.app/Contents/Resources/Signed_Glyph.tiff
/Applications/Mail.app/Contents/Resources/Signed_Pressed.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_Left.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_LeftPress.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_Middle.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_MiddlePress.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_Right.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_RightNoArrow.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_RightPress.tiff
/Applications/Mail.app/Contents/Resources/SlideshowButton_RightPressNoArrow.tiff
/Applications/Mail.app/Contents/Resources/SmartFolderLarge.tiff
/Applications/Mail.app/Contents/Resources/SmartFolderSmall.tiff
/Applications/Mail.app/Contents/Resources/SplitterHandle.tiff
/Applications/Mail.app/Contents/Resources/splitterShadowLeft.tiff
/Applications/Mail.app/Contents/Resources/SpotlightBarBackground.tiff
/Applications/Mail.app/Contents/Resources/status-available.tiff
/Applications/Mail.app/Contents/Resources/sv.lproj/stopSign.tiff
/Applications/Mail.app/Contents/Resources/Synchronize.tiff
/Applications/Mail.app/Contents/Resources/TB_AddressBook.tiff
/Applications/Mail.app/Contents/Resources/TB_AddToAddressBook.tiff
/Applications/Mail.app/Contents/Resources/TB_Append.tiff
/Applications/Mail.app/Contents/Resources/TB_Attach.tiff
/Applications/Mail.app/Contents/Resources/TB_Bounce.tiff
/Applications/Mail.app/Contents/Resources/TB_Colors.tiff
/Applications/Mail.app/Contents/Resources/TB_CustomizeToolbar.tiff
/Applications/Mail.app/Contents/Resources/TB_Delete.tiff
/Applications/Mail.app/Contents/Resources/TB_Flag.tiff
/Applications/Mail.app/Contents/Resources/TB_FontBigger.tiff
/Applications/Mail.app/Contents/Resources/TB_Fonts.tiff
/Applications/Mail.app/Contents/Resources/TB_FontSmaller.tiff
/Applications/Mail.app/Contents/Resources/TB_Forward.tiff
/Applications/Mail.app/Contents/Resources/TB_Get_Mail.tiff
/Applications/Mail.app/Contents/Resources/TB_iChat.tiff
/Applications/Mail.app/Contents/Resources/TB_iChat_Inactive.tiff
/Applications/Mail.app/Contents/Resources/TB_iChat_Pressed.tiff
/Applications/Mail.app/Contents/Resources/TB_IncludeAttachments.tiff
/Applications/Mail.app/Contents/Resources/TB_Junk.tiff
/Applications/Mail.app/Contents/Resources/TB_Mailboxes.tiff
/Applications/Mail.app/Contents/Resources/TB_MakePlain.tiff
/Applications/Mail.app/Contents/Resources/TB_MakeRich.tiff
/Applications/Mail.app/Contents/Resources/TB_New.tiff
/Applications/Mail.app/Contents/Resources/TB_Offline.tiff
/Applications/Mail.app/Contents/Resources/TB_Online.tiff
/Applications/Mail.app/Contents/Resources/TB_Print.tiff
/Applications/Mail.app/Contents/Resources/TB_Read.tiff
/Applications/Mail.app/Contents/Resources/TB_Redirect.tiff
/Applications/Mail.app/Contents/Resources/TB_Reply.tiff
/Applications/Mail.app/Contents/Resources/TB_Reply_All.tiff
/Applications/Mail.app/Contents/Resources/TB_SaveAsDraft.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerLeft.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerLeftInactive.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerLeftPress.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerLeftRoll.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerRight.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerRightInactive.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerRightPress.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_InnerRightRoll.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_LeftCap.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_LeftCapInactive.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_LeftCapPress.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_LeftCapRoll.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_RightCap.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_RightCapInactive.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_RightCapPress.tiff
/Applications/Mail.app/Contents/Resources/TB_Segment_RightCapRoll.tiff
/Applications/Mail.app/Contents/Resources/TB_Send.tiff
/Applications/Mail.app/Contents/Resources/TB_ShowHeaders.tiff
/Applications/Mail.app/Contents/Resources/TB_Single_Middle.tiff
/Applications/Mail.app/Contents/Resources/TB_Single_MiddleInactive.tiff
/Applications/Mail.app/Contents/Resources/TB_Single_MiddlePress.tiff
/Applications/Mail.app/Contents/Resources/TB_Single_MiddleRoll.tiff
/Applications/Mail.app/Contents/Resources/TB_Threads.tiff
/Applications/Mail.app/Contents/Resources/TB_Unread.tiff
/Applications/Mail.app/Contents/Resources/Thread_Collapsed.tiff
/Applications/Mail.app/Contents/Resources/Thread_Collapsed_White.tiff
/Applications/Mail.app/Contents/Resources/Thread_Expanded.tiff
/Applications/Mail.app/Contents/Resources/Thread_Expanded_White.tiff
/Applications/Mail.app/Contents/Resources/Thread_Rollover.tiff
/Applications/Mail.app/Contents/Resources/Thread_Rollover_White.tiff
/Applications/Mail.app/Contents/Resources/ThreadListHeader.tiff
/Applications/Mail.app/Contents/Resources/ToBeDeliveredMailbox.tiff
/Applications/Mail.app/Contents/Resources/ToBeDeliveredMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/TrashMailbox.tiff
/Applications/Mail.app/Contents/Resources/TrashMailboxLarge.tiff
/Applications/Mail.app/Contents/Resources/unread.tiff
/Applications/Mail.app/Contents/Resources/unread_header.tiff
/Applications/Mail.app/Contents/Resources/unread_selected.tiff
/Applications/Mail.app/Contents/Resources/ViewerPreferences.tiff

Mail's Tiger image is approximately 2 MB per architecture. Meaning all things considered it too works harder and longer to load its bloody toolbar and other images than it does loading its executable code.

In All Honesty

In all honesty these hundreds (thousands) of images don't all have to be loaded at runtime - the code might play it clever with 'lazy load' and only get them when they're needed.

But they still have to be loaded sooner or later - and most of them have lots of Yin Yang in them.

Woo-hoo.

Code vs Data

Code is always better than data. That's why there are things like toolbar engines. All a toolbar engine needs is one glyph per button - the code takes care of the rest. Programmatically creating the disabled, pressed, checked, and other images on the fly.

In fact it probably takes as much or more code - and certainly more time - to calculate the name of the file needed and load it as it does to just let a toolbar engine do its thing.

Which is why it's never good to keep things outside the system: if it's a good idea then integrate it.

But this Yin Yang thing is now five years old.

Yin Yang Gallery

Some of the yin yang imagery hiding everywhere in OS X.







*wジョンソン author of the above lyrics and also the immortal line 'それに吸いたいと思うときしないそれを緩めなさい 来たいと思う時' and author of the 'acclaimed' autobiography A Bone In My Flute (17 March 1994) was diagnosed 1991 as HIV positive and has since retired to a life of painting. There is no connection between the works of wジョンソン and this stupid article other than that he was on the telly at the time the article was redacted.

About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.