Skip to content

Instantly share code, notes, and snippets.

var characterKeys = ['s', 'o', 'n', 'b', 'i', 'u', 'a', 'e'];
[[CPDOMWindowBridge sharedDOMWindowBridge] preventCharacterKeysFromPropagating: characterKeys]
var keyCodes = [37, 38, 39, 40];
[[CPDOMWindowBridge sharedDOMWindowBridge] preventKeyCodesFromPropagating: keyCodes];
@cappuccino
cappuccino / gist:9848
Created September 10, 2008 07:49
TextView
@implementation CPTextView : CPView
{
DOMElement FIXME_textArea;
id _delegate;
CPScrollView _scrollView;
CPView _contentView;
JSObject _existingSelectStart;
var embed = [[ReadOnlyTextField alloc] initWithFrame:CGRectMake(90, 50, 236, 20)];
[embed setFont:[CPFont systemFontOfSize:12.0]];
[embed setBordered:YES];
[embed setBezeled:YES];
[embed setBezelStyle:CPTextFieldSquareBezel];
[embed setEditable:YES];
[embed setStringValue: "theIframeCode"];
jscore: jscore.m
gcc -Wall -g -lobjc -o jscore jscore.m -framework JavaScriptCore -framework Foundation
clean:
rm -rf jscore *.o
{ scopeName = 'source.js.objj';
fileTypes = ( 'j', 'J' );
foldingStartMarker = '(?x)
/\*\*(?!\*)
|^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S))
|^@(interface|protocol|implementation)\b
';
foldingStopMarker = '(?<!\*)\*\*/|^\s*\}|^@end\b';
patterns = (
{ name = 'meta.interface-or-protocol.js.objj';
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;1E;E;K;8;$objectsA;S;5;$nullD;K;6;$classD;K;6;CP$UIDd;1;2E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;3E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;29;_CPCibObjectDataRootObjectKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;4E;K;10;CP.objectsA;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;1;0E;E;E;D;K;10;$classnameS
@implementation LEProfilePresentation : CPDictionary
{
CPString _name @accessors(property=name);
}
+ (id)alloc
{
var object = [CPDictionary alloc];
object.isa = [self class];
@cappuccino
cappuccino / gist:38069
Created December 19, 2008 18:19 — forked from boucher/gist:11652
File Upload
//
// 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>
@cappuccino
cappuccino / inspector.js
Created January 14, 2009 05:36 — forked from anonymous/gist:46802
Replace WebKit.app/Contents/Frameworks/10.5/WebCore.framework/Resources/inspector/inspector.js with this file for better objective-j debugging support
/* utilities.js */
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
/*
* AppController.j
*
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>