Skip to content

Instantly share code, notes, and snippets.

//
// 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>
@implementation Reference : CPObject
{
CPArray authors @accessors;
CPString type @accessors;
CPString title @accessors;
CPString publisher @accessors;
CPString location @accessors;
CPString pages @accessors;
CPString volume @accessors;
CPString extra @accessors;
CPWindow sheet;
...
sheet = [[CPWindow alloc] initWithContentRect:CGRectMake(0, 0, [formView frame].size.width, [formView frame].size.height) styleMask:CPBorderlessWindowMask];
[sheet setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMaxYMargin];
[sheet setHasShadow:YES];
[sheet setContentView:formView];
/*
* CPPropertyAnimation.j
* AppKit
*
* Created by Nicholas Small. (extended by David Cann)
* 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
// assumes sheet is an ivar
var mainWindow = [[[CPApplication sharedApplication] delegate] theWindow];
[[mainWindow contentView] addSubview:shadeView];
[[CPApplication sharedApplication] runModalForWindow:sheet];
[sheet setFrame:CGRectMake(
([mainWindow frame].size.width / 2) - ([sheet frame].size.width / 2),
-[sheet frame].size.height - 20,
/*
* DCInfoBubbleController.j
*
* Created by David Cann.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@import "DCLinkTextField.j"
/*
* DCLinkTextField.j
*
* Created by David Cann on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation DCLinkTextField : CPTextField {
/*
* DCTextArea.j
*
* Created by David Cann on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation DCTextArea : CPControl {
AVAudioPlayer *audioPlayer;
...
audioPlayer = [[AVAudioPlayer alloc] initWithData:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"DCMainCarouselMusic" ofType:@"m4a"]] error:nil];
audioPlayer.numberOfLoops = 0;
[audioPlayer prepareToPlay];
[audioPlayer play];
...
/*
* DCToolbar.j
* Flllow
*
* Created by Cann on May 24, 2010.
* Copyright 2010, Cann All rights reserved.
*/
@import <Foundation/CPObject.j>