Skip to content

Instantly share code, notes, and snippets.

View brestac's full-sized avatar
💭
My status just changed

Romain Brestac brestac

💭
My status just changed
View GitHub Profile
/*
* 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
@import <AppKit/CPView.j>
@import <AppKit/CPAnimation.j>
CPViewAnimationStartFrameKey = "CPViewAnimationStartFrameKey";
CPViewAnimationEndFrameKey = "CPViewAnimationEndFrameKey";
CPViewAnimationTargetKey = "CPViewAnimationTargetKey";
CPViewAnimationEffectKey = "CPViewAnimationEffectKey";
CPViewAnimationFadeInEffect = "CPViewAnimationFadeInEffect";
CPViewAnimationFadeOutEffect = "CPViewAnimationFadeOutEffect";
- (void)drawRect:(CGRect)rect
{
var ctx = [[CPGraphicsContext currentContext] graphicsPort];
CGContextSetFillColor(ctx, [CPColor redColor]);
var path = CGPathCreateMutable();
CGPathAddRect(path,NULL,CGRectMake(10,10,50,50));
CGContextAddPath(ctx, path);
CGContextFillPath(ctx);
- (void)drawRect:(CGRect)rect
{
var ctx = [[CPGraphicsContext currentContext] graphicsPort];
CGContextSetFillColor(ctx, [CPColor redColor]);
var path = CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, 50,50);
CGPathAddLineToPoint(path, NULL, 50,150);
CGPathAddLineToPoint(path, NULL, 150,150);
@import "CPObject.j"
@import "CPString.j"
@import "CPDate.j"
@import "CPDictionary.j"
@import "CPBundle.j"
@import "CPException.j"
@import "CPKeyedArchiver.j"
@import "CPKeyedUnarchiver.j"
@import <AppKit/CPCookie.j>
@implementation CPArray (MoveIndexes)
- (void)moveIndexes:(CPIndexSet)indexes toIndex:(int)insertIndex
{
var aboveCount = 0,
object,
removeIndex;
var index = [indexes lastIndex];
@implementation AppController : CPObject
{
var theWindow;
var menu;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
theWindow = [[MyWindow alloc] initWithContentRect:CGRectMake(50,50,500,500) styleMask:CPResizableWindowMask],
contentView = [theWindow contentView];
Statically Preprocessing CPMenuItem.j
Statically Preprocessing CPOpenPanel.j
Statically Preprocessing CPOutlineView.j
Statically Preprocessing CPPanel.j
Statically Preprocessing CPPasteboard.j
Statically Preprocessing CPPopUpButton.j
Exception in thread "main" java.lang.RuntimeException
at org.dojotoolkit.shrinksafe.Compressor.compress(Compressor.java:551)
at org.dojotoolkit.shrinksafe.Compressor.compressScript(Compressor.java:727)
at org.dojotoolkit.shrinksafe.Main.processFiles(Main.java:191)
Statically Preprocessing AppKit.j
Compacting /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/AppKit
cp -r /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/AppKit/. /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/lib/Frameworks/AppKit
js: "/Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/narwhal/packages/objj/lib/objj/objj.js#20(eval)#2422(eval)", line 86: uncaught JavaScript runtime exception: ReferenceError: "CPPopUpButton" n'est pas dŽfini
at /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/narwhal/packages/objj/lib/objj/objj.js#20(eval)#2422(eval):86 ($AristoThemeDescriptor__themedPopUpButton)
at /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/narwhal/packages/objj/lib/objj/objj.js#20(eval)#2422(eval):80
at /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/narwhal/packages/objj/lib/objj/objj.js#20(eval)#2422(eval):68
at /Volumes/GAMMA/DEVELOPPEMENT/BUILDS/CAPPUCCINO/Release/env/narwhal/packages/objj/lib/objj/obj
var string = @"/a/b";
var selector = @selector(lastPathComponent);
var invocation = [CPInvocation invocationWithMethodSignature:nil];
[invocation setTarget:string];
[invocation setSelector:selector];
var result = [invocation invoke];
CPLogConsole("RESULT = "+ result);