Skip to content

Instantly share code, notes, and snippets.

View nickjs's full-sized avatar

Nicholas J. Small nickjs

View GitHub Profile
- (LEAnimation)initWithView:(CPView)aView property:(NSString)keyPath
{
self = [super initWithDuration:1.0 animationCurve:CPAnimationLinear];
if(self)
{
if([aView respondsToSelector:keyPath]){
_view = aView;
_getPath = keyPath;
_setPath = "set"+[[keyPath capitalizedString] substringToIndex:1]+[keyPath substringFromIndex:1]+":";
} else {
- (void)showLoginWindow:(id)sender
{
if(!_loginView)
{
_loginView = [[CPView alloc] initWithFrame:CGRectMake(0,0,600,600)];
var email = [[CPTextField alloc] initWithFrame:CGRectMake(0,0,100,20)];
[email setBordered:YES]; [email setBezeled:YES];
[_loginView addSubview:email];
}
@implementation LEToolbar : CPView
{
CPView _toolbarPart;
CPView _stackPart;
LEAnimation _toolbarOpenAnimation;
LEAnimation _toolbarCloseAnimation;
LEAnimation _stackOpenAnimation;
LEAnimation _stackCloseAnimation;
}
function LEAlert(string)
{
var alertWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0,0,300,150) styleMask:CPHUDBackgroundWindowMask | CPClosableWindowMask];
[alertWindow center];
[alertWindow setTitle:LEL.alertWindowTitle];
var content = [alertWindow contentView];
var text = [LELabel labelWithStringValue:string];
[text setTextColor:[CPColor whiteColor]];
var kLEDefaultPreferencesController;
@implementation LEPreferencesController : CPWindowController
{
}
+ (id)defaultController
{
if(!kLEDefaultPreferencesController)
@implementation LEStickyNote : CPView
{
CPTextField _label;
id mouseDownPoint;
}
+ (id)stickyWithStringValue:(CPString)stringValue
{
return [[LEStickyNote alloc] initWithStringValue:stringValue];
}
/*
* CPPropertyAnimation.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2008, Nicholas Small.
*
* 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
@implementation LEThumbnailView : CPView
{
CPView _root;
CPShadowView _shadow;
CPImageView _image;
CPTextField _label;
CPView _tooltip;
id _object;
}
@implementation LEProfileContentView : CPObject
{
CPColor _backgroundColor;
}
- (id)initUntitled
{
self = [super init];
if(self)
@implementation ServerRequester : CPObject
{
CPString _returnData @accessors(property=returnData);
id _delegate @accessors(property=delegate);
}
- (void)request:action data:(Object)jsonData
{
var actionURL = null;