Skip to content

Instantly share code, notes, and snippets.

View saikat's full-sized avatar

Saikat Chakrabarti saikat

View GitHub Profile
@import <AppKit/CPView.j>
CPTextViewDidFocusNotification = @"CPTextViewDidFocusNotification";
CPTextViewDidBlurNotification = @"CPTextViewDidBlurNotification";
@implementation CPTextView : CPControl
{
DOMElement _inputElement;
id _delegate;
CPScrollView _scrollView;
/*
* AppController.j
* TestText
*
* Created by You on October 30, 2009.
* Copyright 2009, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
/*
* AppController.j
* TestText
*
* Created by You on October 30, 2009.
* Copyright 2009, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
/*
* AppController.j
* CPTextFieldBug
*
* Created by You on November 7, 2009.
* Copyright 2009, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
// One instance
BEGIN;
select * from project_widget where id = 246;
delete from project_widget where id = 246;
insert into project_widget (id, widget_type, x_origin, y_origin, width, height, text, link_id, color, screen_id, parent_widget_id, font_size, font_face, is_autosized, z_order)
VALUES (246, 'test', 1, 1, 1, 1, 'test', 132, 'oe', 132, 247, 1, 'aoeu', FALSE, 0);
commit;
// Another instance
BEGIN;
Tassatop-2:Source saikat$ cd cappuccino
Tassatop-2:cappuccino saikat$ git checkout -b jake origin/jake
Branch jake set up to track remote branch refs/remotes/origin/jake.
Switched to a new branch "jake"
Tassatop-2:cappuccino saikat$ sudo ./bootstrap.sh
================================================================================
Narwhal JavaScript platform is required. Install it into "/usr/local/narwhal"?
Enter "yes" or "no":
yes
Downloading Narwhal...
Tassatop-2:cappuccino saikat$ sudo rm -rf /usr/local/narwhal
Tassatop-2:cappuccino saikat$ sudo rm -rf /usr/local/share/objj
Tassatop-2:cappuccino saikat$ sudo rm -rf /usr/local/share/narwhal
Tassatop-2:cappuccino saikat$ sudo rm -rf $CAPP_BUILD
Tassatop-2:cappuccino saikat$ cd /usr/local/bin
Tassatop-2:bin saikat$ sudo rm activate activate.bash activate.cmd bake blend capp cplutil jackup js json narwhal narwhal.cmd nib2cib objj objjc ojtest press sea sea.cmd tusk tusk.cmd
Tassatop-2:bin saikat$ echo $CAPP_BUILD
/Users/saikat/Development/Source/capp_build
Tassatop-2:bin saikat$ rm -rf $CAPP_BUILD
Tassatop-2:bin saikat$ cd ~/Development/Source
@import <AppKit/CPToolbar.j>
@implementation CPToolbar(ToolbarItemFetching)
{ }
- (CPToolbarItem)itemForIdentifier:(CPString)anIdentifier
{
var count = [_items count];
for (var i = 0; i < count; ++i)
if (_items[i]._itemIdentifier === anIdentifier)
@import <AppKit/CPTextField.j>
Alphanumeric = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ";
SearchFieldDidPressEnterNotification = @"SearchFieldDidPressEnterNotification";
SearchFieldDidPressDownArrowNotification = @"SearchFieldDidPressDownArrowNotification";
SearchFieldDidPressUpArrowNotification = @"SearchFieldDidPressUpArrowNotification";
SearchFieldDidPressRightArrowNotification = @"SearchFieldDidPressRightArrowNotification";
SearchFieldDidPressLeftArrowNotification = @"SearchFieldDidPressLeftArrowNotification";
@implementation SearchField : CPTextField
- (void)setDocument:(CPDocument)aDocument
{
if (aDocument === _document)
return;
[super setDocument:aDocument];
var unloadFunction = function() {
if ([_document isDocumentEdited]) {
return "Your document has unsaved changes. If you leave, you will lose any unsaved changes to your document.";