Skip to content

Instantly share code, notes, and snippets.

View saikat's full-sized avatar

Saikat Chakrabarti saikat

View GitHub Profile
{
"sources" : [
{
"type" : "git",
"path" : "git://github.com/280north/cappuccino.git",
"parts" : [
{
"src" : "Objective-J",
"dst" : "Frameworks/Objective-J",
"copyFrom" : "Release/Objective-J"
/*
* AppController.j
*
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
/*
* AppController.j
*
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
// Attempt at a themeable CPTextView
@import <AppKit/CPView.j>
@import <AppKit/CPTextField.j>
// Code extended from code at http://gist.github.com/9848
@implementation CPTextView : CPControl
{
DOMElement FIXME_textArea;
@import <AppKit/CPView.j>
// Code extended from code at http://gist.github.com/9848
@implementation CPTextView : CPView
{
DOMElement FIXME_textArea;
id _delegate;
- (EditableUIView)parentEditableUIView
{
var parentView = [self superview];
while ([parentView class] != [EditableUIView class])
superview = [parentView superview];
return superview;
}
//
// FileUpload.j
// Editor
//
// Created by Francisco Tolmasky on 03/04/08.
// Copyright 2005 - 2008, 280 North, Inc. All rights reserved.
//
import <Foundation/CPObject.j>
import <Foundation/CPValue.j>
var request = [CPURLRequest requestWithURL:serverRoot + "/login/"],
JSONString = '{"email" : "something"}';
[request setHTTPMethod: "POST"];
[request setHTTPBody: JSONString];
[request setValue:"application/json" forHTTPHeaderField:"Accept"] ;
[request setValue:"application/json" forHTTPHeaderField:"Content-Type"] ;
return [CPURLConnection connectionWithRequest:request delegate:self];
- (void)setCurrentScreen:(Screen)aScreen
{
if (aScreen == currentScreen)
return;
[currentScreen removeFromSuperview];
currentScreen = aScreen;
if (currentScreen) {
[screenBorder addSubview:currentScreen];
}
[[[CPApplication sharedApplication] mainWindow] close];
var documentController = [CPDocumentController sharedDocumentController],
documents = [documentController documents],
count = [documents count];
for (var i = 0; i < count; ++i)
[documentController removeDocument:documents[i]];