Skip to content

Instantly share code, notes, and snippets.

View BlairDuncan's full-sized avatar

Blair Duncan BlairDuncan

  • SGL Studio / BBDO Toronto
  • Toronto, Canada
View GitHub Profile
@implementation CPURL(add_targetAction)
// setters
- (void)setAction:(SEL)aAction
{
[self setResourceValue:aAction forKey:"action"];
}
- (void)setData:(id)aData
{
@implementation CPUserDefaultsLocalStore(FixForPrivateBrowsingExceptionError)
- (void)setData:(CPData)aData
{
// wrapping in a try/catch so as to not send a DOM Exception error when Private Browsing is enabled
try
{
localStorage.setItem(_domain, encodeURIComponent([aData rawString]));
}
catch (e)
- (CPDragOperation)outlineView:(CPOutlineView)theOutlineView validateDrop:(id)info proposedItem:(id)item proposedChildIndex:(CPInteger)childIndex
{
if(CPLOG_ON) CPLog.debug(self + _cmd + item + " proposedChildIndex:" + childIndex);
// This method validates whether or not the proposal is a valid one.
// We start out by assuming that we will do a "generic" drag operation, which means we are accepting the drop. If we return CPDragOperationNone, then we are not accepting the drop.
var result = CPDragOperationGeneric;
if ([self onlyAcceptDropOnRoot:info])
@implementation myCustomView : CPView
{
CPTextField textfield1;
CPTextField textfield2;
CPTextField textfield;
CPImageView imageView;
}
- (void)initIfNeeded
Wed Apr 20 2011 15:32:41 GMT-0400 (EDT) [warn] 2011-04-20 15:32:41.104 Cappuccino [yellow(warn)]: CFBundle.prototype.path is deprecated, use CFBundle.prototype.bundlePath instead.
Wed Apr 20 2011 15:32:41 GMT-0400 (EDT) [warn] 2011-04-20 15:32:41.106 Cappuccino [yellow(warn)]: CFBundle.prototype.path is deprecated, use CFBundle.prototype.bundlePath instead.
Adding Frameworks/AppKit/CPSplitView.j to Frameworks/AppKit/Browser.environment/AppKit.sj
Wed Apr 20 2011 15:32:41 GMT-0400 (EDT) [warn] 2011-04-20 15:32:41.113 Cappuccino [yellow(warn)]: CFBundle.prototype.path is deprecated, use CFBundle.prototype.bundlePath instead.
Wed Apr 20 2011 15:32:41 GMT-0400 (EDT) [warn] 2011-04-20 15:32:41.115 Cappuccino [yellow(warn)]: CFBundle.prototype.path is deprecated, use CFBundle.prototype.bundlePath instead.
Adding Frameworks/AppKit/CPButtonBar.j to Frameworks/AppKit/Browser.environment/AppKit.sj
Wed Apr 20 2011 15:32:41 GMT-0400 (EDT) [warn] 2011-04-20 15:32:41.122 Cappuccino [yellow(warn)]: CFBundle.prototype.path is
/*
* LPMultiLineTextField.j
*
* Created by Ludwig Pettersson on January 22, 2010.
*
* The MIT License
*
* Copyright (c) 2010 Ludwig Pettersson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:BlairDuncan/cappuccino.git
[branch "master"]
T08-0450:cappuccino bduncan$ cd /Users/bduncan/narwhal
T08-0450:narwhal bduncan$ ls -al
total 416
drwxr-xr-x 20 bduncan 2075847041 680 Aug 27 12:22 .
drwxrwxrwx+ 37 bduncan 2075847041 1258 Aug 27 12:21 ..
drwxr-xr-x 5 bduncan 2075847041 170 Aug 27 12:22 .tusk
-rw-r--r-- 1 bduncan 2075847041 12401 Aug 13 15:52 README.md
drwxr-xr-x 18 bduncan 2075847041 612 Aug 27 12:24 bin
-rw-r--r-- 1 bduncan 2075847041 110811 Aug 13 15:52 catalog-2.json
-rw-r--r-- 1 bduncan 2075847041 38332 Aug 13 15:52 catalog.json
cd deps/http-parser && make http_parser.o
ragel -s -G2 http_parser.rl -o http_parser.c
make[1]: ragel: Command not found
make[1]: *** [http_parser.c] Error 127
make: *** [deps/http-parser/http_parser.o] Error 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: building narwhal-jsc failed. Hit enter to continue.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================
Bootstrapping of Narwhal and other required tools is complete.
@implementation LPMultiLineTextField(fix)
- (void)layoutSubviews
{
[super layoutSubviews];
var contentView = [self layoutEphemeralSubviewNamed:@"content-view"
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:@"bezel-view"];
[contentView setHidden:YES];