Skip to content

Instantly share code, notes, and snippets.

var setupSoundManager = function()
{
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "Resources/soundmanager2.js";
script.addEventListener("load", function()
{
window.x = soundManager;
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.displayedProperties = peoplePickerProperties;
picker.peoplePickerDelegate = self;
[viewController presentModalViewController:picker animated:YES];
[picker release];
import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPTextField label;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
import <Foundation/CPObject.j>
@implementation CalculatorLogic : CPObject
{
CPNumber currentValue;
CPString acumulatedValue;
var decimalPointActive;
//1 * 0.1 * 0.1 in Js = 0.010000000000000002 :) Strings never fails!!!
id changeValueNotifyDelegate;
}
import <Foundation/CPObject.j>
import "CalculatorLogic.j"
@implementation CalculatorButton : CPButton
{
}
+(id)newCalculatorButton:(CPText)buttonText target:(id)aTarget selector:(SEL)aSelector rect:(CGRect)aFrame
{
- (void)keyDown:(CPEvent)anEvent
{
var keyCode = [anEvent keyCode];
var index = [[_documentsOutlineView selectionIndexes] firstIndex],
count = [[_documentsOutlineView content] count];
switch(keyCode)
{
case 37: //left
diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j
index 3bcd293..3c76043 100644
--- a/AppKit/CPTextField.j
+++ b/AppKit/CPTextField.j
@@ -283,12 +283,14 @@ var _CPTextFieldSquareBezelColor = nil;
element.style.font = _DOMElement.style.font;
element.style.zIndex = 1000;
element.style.width = CGRectGetWidth([self bounds]) - 3.0 + "px";
- element.style.marginTop = "-1px";
+ element.style.marginTop = "0px";
import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
@implementation DTTextField : CPTextField
{
}
+ (DOMElement)_inputElement
{
var CPTextFieldDOMInputElement = nil;
if (!CPTextFieldDOMInputElement)
{
var CPTextFieldDOMInputElement = nil;
@implementation DTTextField : CPTextField
{
}
+ (DOMElement)_inputElement
{
if (!CPTextFieldDOMInputElement)
{