Skip to content

Instantly share code, notes, and snippets.

/*
* AppController.j
* HelixC
*
* Created by You on April 26, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@import "ShipView.j"
/**
Creates the objects that represent the model
*/
- (void) createObjects:(CPNumber)numberOfObjects{
var fixDef = new b2FixtureDef;
fixDef.density = 1.0;
fixDef.friction = 0.5;
fixDef.restitution = 0.2;
fixDef.shape = new b2CircleShape(
Math.random() + 0.1 //radius
@implementation View
-(id)copyWithZone:(NSZone *)zone {
View* theCopy = [[View allocWithZone:zone] initWithFrame:[self frame]];
[theCopy setDelegate:[self delegate]];
[theCopy setSelected:[self selected]];
return theCopy;
}
@Alos
Alos / gist:900808
Created April 3, 2011 21:02
AppDelegate.m
- (IBAction)addNewAlbum:(id)sender {
Album *newAlbum = [[Album alloc] init];
newAlbum.name= [newAlbumName stringValue];
newAlbum.releaseDate = [newAlbumReleaseDate dateValue];
NSManagedObjectContext *context = [self managedObjectContext];
[NSEntityDescription insertNewObjectForEntityForName:@"Album" inManagedObjectContext:context];
[self insertObject:newAlbum inAlbumArrayAtIndex:0];
[addAlbumWindow orderBack:self];
}
@Alos
Alos / gist:900786
Created April 3, 2011 20:41
Album.h
@interface Album : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * pathToImage;
@property (nonatomic, retain) NSDate * releaseDate;
@property (nonatomic, retain) NSManagedObject * artist;
@end
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPWindow window; //this "outlet" is connected automatically by the Cib
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
-(void)getUserData{
var app = [CPApp delegate];
var aURL = [app serverIP] + "/GetUserData";
CPLog.info("Getting User data at: %s", aURL);
var request = [CPURLRequest requestWithURL:aURL];
xyzConnection = [CPURLConnection connectionWithRequest:request delegate:self];
}
@implementation QuestionsTableController : CPObject
{
@outlet CPTableView questionsTableView;
}
- (id)init
{
if (self = [super init])
{
[self initTableView];
rm -f stamp-h1
touch config.h.in
make all-recursive
Making all in src
sh ./makelist -h ./vi.c > vi.h
sh ./makelist -h ./emacs.c > emacs.h
sh ./makelist -h ./common.c > common.h
sh ./makelist -fh vi.h emacs.h common.h > fcns.h
sh ./makelist -bh ./vi.c ./emacs.c ./common.c > help.h
sh ./makelist -fc vi.h emacs.h common.h > fcns.c
//
// iDrawAppDelegate.m
// iDraw
//
// Created by Alos on 7/22/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "iDrawAppDelegate.h"
#import "MyViewController.h"