Skip to content

Instantly share code, notes, and snippets.

View hammerdr's full-sized avatar

Derek Hammer hammerdr

View GitHub Profile
var result = obj.createResult(resultType);
result.add(new LineItem("A"));
result.add(new LineItem("B"));
Utility.populate(dependency, obj, "C", "D", "E");
result.add(new LineItem("F");
return result;
- (void)testThatCPArrayDoesSortUsingDescriptorsForStrings
{
var target = ["a", "b", "c", "d"];
[target sortUsingDescriptors:[[[CPSortDescriptor alloc] initWithKey:@"stringValue" ascending:YES]]];
CPLog.error(target);
}
- (void)testThatCPArrayDoesSortUsingTwoDescriptors
{
var descriptors = [
[[CPSortDescriptor alloc] initWithKey:@"value" ascending:NO],
[[CPSortDescriptor alloc] initWithKey:@"number" ascending:NO]
];
var target = [
[[CPPrettyObject alloc] initWithValue:@"a" number:1],
[[CPPrettyObject alloc] initWithValue:@"a" number:2],
diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j
index 42e0632..7bf9d18 100644
--- a/AppKit/CPTableView.j
+++ b/AppKit/CPTableView.j
@@ -217,6 +217,10 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
CPTableColumn _draggedColumn;
CPArray _differedColumnDataToRemove;
+
+ CPArray _layedOutDataViews;
var methods = [];
for(var i = 0; i < 10; i++)
{
methods.push(function() {
require("system").print(i);
});
}
for(var k = 0; k < 10; k++)
DH6256s-MacBook-Pro:~ ThoughtWorks$ rvm install rbx
rbx-1.1.0-20100923 installing #dependencies
rbx-1.1.0-20100923 #downloading (rubinius-1.1.0-20100923.tar.gz), this may take a while depending on your connection...
rbx-1.1.0-20100923 - #extracting
rbx-1.1.0-20100923 - #configuring
rbx-1.1.0-20100923 - #compiling
Error running '/Users/ThoughtWorks/.rvm/wrappers/ruby-1.8.7-p302/rake install', please check /Users/ThoughtWorks/.rvm/log/rbx-1.1.0-20100923/rake.error.log
There has been an error while running '/Users/ThoughtWorks/.rvm/wrappers/ruby-1.8.7-p302/ruby ./configure --prefix=/Users/ThoughtWorks/.rvm/rubies/rbx-1.1.0-20100923 --skip-system'.
Halting the installation.
DH6256s-MacBook-Pro:~ ThoughtWorks$ more ~/.rvm/log/rbx-1.1.0-20100923/rake.error.log
- (id)init
{
...
loginController = [LoginController createWithDelegate:self];
...
var controllers = [loginController, stepOneController, stepTwoController];
[bodyView addSubview:[loginController view]];
...
}
def create
@receipt = Receipt.new(
... (several params here)
:store => Store.find_or_create_by_name(params[:receipt][:store_name])
... (more fucking parameters here))
end
@hammerdr
hammerdr / Event.j
Created May 22, 2011 22:17 — forked from Synvox/Event.j
Cappuccino Instance Variables Problem
/*
* Event.j
* Canvas Creator
*
* Created by Ryan on May 21th, 2011.
* Copyright 2011, Synvox rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
module First
def hello; "FIRST"; end
end
Speak.send :include, First