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
upArrow = [[CPImage alloc] initWithContentsOfFile:@"Resources/upArrow.png" size:CGSizeMake(8.0, 7.0)]; | |
downArrow = [[CPImage alloc] initWithContentsOfFile:@"Resources/downArrow.png" size:CGSizeMake(8.0, 7.0)]; | |
@implementation CPTableHeaderView (myAdditions) | |
- (void)mouseDown:(CPEvent)anEvent | |
{ | |
var selectedColumnNumber = [self columnAtPoint:[self convertPoint:[anEvent locationInWindow] fromView:nil]]; | |
if(selectedColumnNumber == CPNotFound) return; |
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> | |
@implementation AppController : CPObject | |
{ | |
} | |
- (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
{ |
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
- (void)_updateResizeCursor:(CPEvent)theEvent | |
{ | |
if(![_tableView allowsColumnResizing] || ![_tableView columnAutoresizingStyle]) | |
{ [[CPCursor arrowCursor] set]; | |
return | |
} | |
var mouseLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil], | |
mouseOverLocation = CGPointMake(mouseLocation.x - 5, mouseLocation.y), | |
overColumn = [self columnAtPoint:mouseOverLocation]; | |
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
+ /Users/bduncan/narwhal/packages/narwhal-jsc/src/os-engine.cc | |
+ /Users/bduncan/narwhal/packages/narwhal-jsc/src/readline.cc | |
+ /Users/bduncan/narwhal/packages/narwhal-jsc/tests/interpreter-tests.js | |
Done. | |
sh configure | |
No <JavaScriptCore/JavaScript.h> detected. Using <JavaScriptCore/JavaScriptCore.h> instead. | |
gcc -o lib/libnarwhal.dylib narwhal.c -dynamiclib -0s -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -Iinclude -framework JavaScriptCore -lreadline | |
mkdir -p `dirname bin/narwhal-webkit` | |
gcc -o bin/narwhal-webkit -DWEBKIT -x objective-c narwhal-jsc.c -0s -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -Iinclude -framework JavaScriptCore -L/usr/lib -lreadline -liconv -Llib -lnarwhal \ | |
-framework Foundation -framework WebKit |
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> | |
@implementation AppController : CPObject | |
{ | |
@outlet CPWindow theWindow; //this "outlet" is connected automatically by the Cib | |
} | |
- (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
{ |
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 CPString(htmlentities) | |
+ (CPString)stripHtmlEntites:(CPString)aString | |
{ | |
//FIXME currently only supports decimal entities | |
// alert([CPString stringWithoutHtmlEntites:@"Montréal"]); | |
//alert([CPString stringWithoutHtmlEntites:@"Montréal"]); | |
var matches = aString.match(/&#\d+;?/g); | |
if(matches) | |
for(var i = 0; i < matches.length; i++) |
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
-(CPURLRequest)createFindRequestWithIdentifier:(BOOL)useIndentifier | |
{ | |
var userID = [userID_TextField stringValue]; | |
var userPW = [userPW_TextField stringValue]; | |
var content = [[CPString alloc] initWithFormat:@"userID=%@&userPW=%@", | |
[userID urlencode], | |
[userPW urlencode]]; | |
var contentLength = [[CPString alloc] initWithFormat:@"%d", [content length]]; |
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
- (void)collapseItem:(id)anItem | |
{ | |
if (!anItem) | |
return; | |
var itemInfo = _itemInfosForItems[[anItem UID]]; | |
if (!itemInfo) | |
return; |
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
var tempSaveSelections = Nil; | |
- (void)saveOutlineSelections | |
{ | |
var rows = [outlineView selectedRowIndexes], | |
dataSet = outlineView._itemsForRows; | |
tempSaveSelections = [dataSet objectsAtIndexes:rows]; | |
// add the current selection at the end for later restore |
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
- (CGRect)frameOfOutlineDataViewAtRow:(CPInteger)aRow | |
{ | |
// the cocoa docs says it returns a zeroRect if not expandable which makes no sence | |
// if(! [self isExpandable:[self itemAtRow:aRow]]) return CGRectMakeZero(); | |
var aColumn = [[self tableColumns] indexOfObjectIdenticalTo:[self outlineTableColumn]] | |
frame = [super frameOfDataViewAtColumn:aColumn row:aRow], | |
indentationWidth = ([self levelForRow:aRow] + 1) * [self indentationPerLevel]; |
OlderNewer