This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation ImageLoaderWorker : CPObject | |
{ | |
CPImageView m_imageView; | |
CPImage m_image; | |
} | |
- (id)initWithUrl:(CPString)urlStr | |
imageView:(CPImageView)anImageView | |
{ | |
self = [super init]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Store all CIB data on a url-data basis in this dictionary. To prevent cibs from | |
* being continously downloaded by the CPWindowController, or rather the CPCib, we | |
* override the responsible init method and cache the data. | |
*/ | |
CibDataCacheDictionary = [CPDictionary dictionary]; | |
@implementation CPCib (CacheDataResponse) | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************** | |
c_a_layer_fixed.j | |
**************************/ | |
@implementation CALayerFixed : CALayer | |
- (void)composite | |
{ | |
var originalTransform = CGAffineTransformCreateCopy(_transformFromLayer); | |
[super composite]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation TNToolTip (WithTimer) | |
+ (TNToolTip)toolTipWithString:(CPString)aString | |
forView:(CPView)aView | |
closeAfter:(float)aSecondsValue | |
{ | |
var tooltip = [TNToolTip toolTipWithString:aString forView:aView]; | |
var stopInvoker = [[CPInvocation alloc] initWithMethodSignature:nil]; | |
[stopInvoker setTarget:tooltip]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <Foundation/CPObject.j> | |
@import "UserSessionController.j" | |
@implementation AppController : CPObject | |
{ | |
CPWindow mainWindow; //this "outlet" is connected automatically by the Cib | |
CPMenu mainMenu; | |
CPView contentView; | |
CPToolbar toolbar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************ | |
Window controllers, gets loaded via a CIB | |
*************/ | |
@implementation GoogleImagesController : CPWindowController | |
{ | |
@outlet CPCollectionView m_photoView; | |
@outlet CPTextField m_searchTerm; | |
@outlet CPImageView m_spinnerImage; | |
@outlet CPScrollView m_scrollView; | |
@outlet CPTextField m_indexField; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation _CPToolbarItemView (MouseEntered) | |
- (void)mouseEntered:(CPEvent)anEvent | |
{ | |
// TODO add code to check whether super responses to this method. | |
if ( [_toolbarItem toolTip] ) { | |
[TNToolTip toolTipWithString:[_toolbarItem toolTip] | |
forView:([_labelField stringValue] === @"" ? _imageView : | |
_labelField) | |
closeAfter:2.5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation TNToolTip (WithTimer) | |
+ (TNToolTip)toolTipWithString:(CPString)aString | |
forView:(CPView)aView | |
closeAfter:(float)aSecondsValue | |
{ | |
var tooltip = [TNToolTip toolTipWithString:aString forView:aView]; | |
var stopInvoker = [[CPInvocation alloc] initWithMethodSignature:nil]; | |
[stopInvoker setTarget:tooltip]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function obtainXibs() | |
{ | |
var xibs = FILE.glob("Xibs/*.xib"); | |
for ( var idx = 0 ; idx < xibs.length; idx++ ) { | |
xibs[idx] = xibs[idx].substring(0, xibs[idx].length - 4).substring(5); | |
} | |
return xibs; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## create directory for a new install of narwhal | |
mkdir ~/tmp | |
cd ~/tmp | |
git clone git://github.com/280north/narwhal.git | |
cd narwhal/ | |
## add the new narwhal to the front of the path | |
export PATH=$(pwd)/bin:$PATH | |
## install necessary tools for building cappuccino |