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 "_CSLinkTextView.j" | |
@implementation CSLinkTextField : CPTextField | |
{ | |
CPString _link; | |
} | |
+ (id)themeAttributes | |
{ | |
return [CPDictionary dictionaryWithObjects:[nil] |
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)loadWindow | |
{ | |
[super loadWindow]; | |
// It's impossible to load a CPDocModalWindow from nib, we work around this by | |
// checking if the loaded window has the correct stylemask, if not we create a new window | |
// with the same size as the old one and set the content view reference to that of the old window | |
if ([_window styleMask] !== CPDocModalWindowMask) | |
{ | |
var contentView = [_window contentView]; |
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
[[CPDate dateWithTimeIntervalSince1970:seconds] isEqualToDate:[CPDate dateWithTimeIntervalSince1970:seconds]] | |
// initWithTimeIntervalSince1970 is defined as | |
- (id)initWithTimeIntervalSince1970:(CPTimeInterval)seconds | |
{ | |
self = new Date(seconds * 1000); | |
return self; | |
} | |
// equalToDate was defined as (not working) |
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
/* | |
* CPUserDefaults.j | |
* AppKit | |
* | |
* Created by Nicholas Small. | |
* Copyright 2009, 280 North, Inc. | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either |
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
- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pasteBoard | |
{ | |
[pasteBoard declareTypes:[NSArray arrayWithObjects: | |
ESTemplateIndexesTableDragType, | |
NSFilenamesPboardType, | |
nil] owner:self]; | |
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes]; | |
[pasteBoard setData:data forType:ESTemplateIndexesTableDragType]; | |
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
KPNumberFormatterNoStyle = 0; | |
KPNumberFormatterDecimalStyle = 1; | |
KPNumberFormatterCurrencyStyle = 2; | |
KPNumberFormatterPercentStyle = 3; | |
@implementation KPNumberFormatter : CPFormatter | |
{ | |
KPNumberFormatterStyle _numberStyle @accessors(property=numberStyle); | |
BOOL _generatesDecimalNumbers @accessors(property=generatesDecimalNumbers); |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
import os | |
import commands | |
import hashlib | |
import getopt | |
from pyfsevents import registerpath, listen |
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
/* | |
* Provide a simple mixin helper to extend classes without inheritence. At the same | |
* time, this demostrates various scenarios when using mixins. | |
* | |
* For more information, check out (branch URL - release 0.8.1 of cappuccino) | |
* https://github.com/280north/cappuccino/blob/release-0.8.1/Objective-J/Runtime.js | |
* Note: this code is base on version 0.8.1 of Cappuccino. | |
* | |
* Install OJTest framework (https://github.com/280north/OJTest/wiki) and this class | |
* can be called: |
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
git rev-list --count --all |
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
GLOBAL(objj_backtrace_decorator) = function(msgSend) | |
{ | |
return function(aReceiverOrSuper, aSelector) | |
{ | |
var aReceiver = aReceiverOrSuper && (aReceiverOrSuper.receiver || aReceiverOrSuper); | |
objj_backtrace.push({receiver: aReceiver, selector:aSelector}); | |
var retVal = msgSend.apply(NULL, arguments); |
OlderNewer