Skip to content

Instantly share code, notes, and snippets.

View Me1000's full-sized avatar

Randy Luecke Me1000

View GitHub Profile
-(id)initWithFrame:(CGRect)aFrame
{
self = [super initWithFrame:aFrame];
if(self){
_upButton = [[CPButton alloc] initWithFrame: CGRectMake(0.0, 0.0, 12.0, 10.0)];
_bottomButtom = [[CPButton alloc] initWithFrame: CGRectMake(0.0, 11.0, 12.0, 12.0)];
_splitter = [[CPView alloc] initWithFrame: CGRectMake(0.0, 10.0, 12.0, 1.0)];
[_upButton setImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_up.png" size:CGSizeMake(12.0, 10.0)]];
/*
* CPTextField.j
* AppKit
*
* Created by Francisco Tolmasky.
* Copyright 2008, 280 North, Inc.
*
* Extended by Randall Luecke (July 21, 2009)
* Adding support for wrapping editable textFields
-(void)drawGridInClipRect:(CGRect)aRect
{
[[CPColor gridColor] setStroke];
if ([self gridStyleMask] | CPTableViewSolidVerticalGridLineMask)
{
var context = [[CPGraphicsContext currentContext] graphicsPort];
var exposedRows = [self rowsInRect:aRect],
exposedColumnIndexes = [self columnIndexesInRect:aRect],
Randys-MacBook-Pro:Cappuccino randy$ rake install
(in /Users/randy/Development/Cappuccino)
(in /Users/randy/Development/Cappuccino)
(in /Users/randy/Development/Cappuccino/External)
(in /Users/randy/Development/Cappuccino/Objective-J)
(in /Users/randy/Development/Cappuccino/Objective-J/Tools)
(in /Users/randy/Development/Cappuccino/Foundation)
Statically Preprocessing CPArray+KVO.j
Statically Preprocessing CPArray.j
Statically Preprocessing CPAttributedString.j
@Me1000
Me1000 / gist:168865
Created August 17, 2009 02:56
An implementation of NSTableView delegate style table building in PHP
<?php
class PHPTableView //extends PHPObject LULZ
{
var $delegate; //actually doesn't do anything... but you know.
var $dataSource;
var $columns; //theoretically a column should be an object but for simplicty sake it's just an array of the column header text... This also needs to be initialized. $tableview->coumns = array(); should work... or in an init method for this class itself.
var $rows; //int
var $dataArray; //
function setDeleagte($aDelegate)
@implementation _CPWindowFrameAnimation : CPAnimation
{
CPWindow _window;
CGRect _startFrame;
CGRect _targetFrame;
}
- (id)initWithWindow:(CPWindow)aWindow targetFrame:(CGRect)aTargetFrame
{
/*the table delegate method*/
- (id)tableView:(CPTableView)tableView objectValueForTableColumn:(CPTableColumn)tableColumn row:(int)row
{
if(row % 2)
{
return {"text": row, "color":"000000"}
}
else
{
return {"text":row, "color":"FFFFFF"}
Last login: Fri Nov 6 22:54:04 on ttys000
Randys-MacBook-Pro:~ randy$ cd Development/Cappuccino
Randys-MacBook-Pro:Cappuccino randy$ ls
AppKit External LICENSE Rakefile bootstrap.sh
Build Foundation Objective-J Tests common.jake
CommonJS Jakefile README Tools
Randys-MacBook-Pro:Cappuccino randy$ sudo ./bootstrap.sh
Password:
Narwhal JavaScript platform is required. Install it into "/usr/local/narwhal"?
Enter "yes" or "no":
var point = CGPointMake(CGRectGetMinX([deadlineField frame]), CGRectGetMaxY([deadlineField frame]));
console.log(point);
point = [projectDetailsView convertPoint:point toView:nil];
console.log(point);
point = [[appController theWindow] convertBaseToGlobal:point];
console.log(point);
/*
* CPTextField.j
* AppKit
*
* Created by Francisco Tolmasky.
* Copyright 2008, 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