Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function load()
{
var foo = document.getElementById("foo"),
bar = document.getElementById("bar"),
baz = document.getElementById("baz");
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function load()
{
var foo = document.getElementById("foo"),
bar = document.getElementById("bar"),
baz = document.getElementById("baz");
diff --git a/Foundation/CPKeyValueObserving.j b/Foundation/CPKeyValueObserving.j
index b88f766..10e6dd5 100644
--- a/Foundation/CPKeyValueObserving.j
+++ b/Foundation/CPKeyValueObserving.j
@@ -486,6 +486,8 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld,
var changeOptions = [CPDictionary dictionaryWithObject:CPKeyValueChangeSetting forKey:CPKeyValueChangeKindKey];
[[_CPKVOProxy proxyForObject:self] _sendNotificationsForKey:aKey changeOptions:changeOptions isBefore:YES];
+
+ [super willChangeValueForKey:aKey];
- (void)mouseDragged:(NSEvent *)anEvent
{
[NSEvent startPeriodicEventsAfterDelay:2.0 withPeriod:0.1];
NSEvent *ev = nil;
BOOL continueTracking = YES;
do
{
ev = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask | NSPeriodicMask];
/*
* AppController.j
* alphaBackgroundBug
*
* Created by Ross Boucher on April 21, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
diff --git a/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j b/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j
index c86dd97..0b64080 100644
--- a/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j
+++ b/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j
@@ -73,7 +73,7 @@ var _CPToolbarViewBackgroundColor = nil;
var frame = CGRectMakeZero();
- frame.origin = CGPointMakeCopy([self toolbarOffset]);
+ frame.origin = CGSizeMakeCopy([self toolbarOffset]);
- (void)connectionDidReceiveAuthenticationChallenge:(CPURLConnection)aConnection
{
_loginConnection = aConnection;
[[LoginPanel sharedLoginPanel] beginWithModalDelegate:self
didEndSelector:@selector(processLogin:result:context:)
contextInfo:nil];
}
@implementation CPEvent (CPCoding)
- (id)initWithCoder:(CPCoder)aCoder
{
var type = [aCoder decodeObjectForKey:CPEventTypeKey],
altKey = [aCoder decodeBoolForKey:CPEventAltKeyKey],
bubbles = [aCoder decodeBoolForKey:CPEventBubblesKey],
button = [aCoder decodeIntForKey:CPEventButtonKey],
cancelBubble = [aCoder decodeBoolForKey:CPEventCancelBubbleKey],
cancelable = [aCoder decodeBoolForKey:CPEventCancelableKey],
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
[contentView setBackgroundColor:[CPColor yellowColor]];
label = [CPTextField labelWithTitle:@"FOO"];
[label setTextColor:[CPColor whiteColor]];
var boxedView = [CPBox boxEnclosingView:label];
[boxedView setFillColor:[CPColor blackColor]];
[boxedView setBorderColor:[CPColor whiteColor]];
[boxedView setCornerRadius:4.0];
[boxedView setBorderWidth:2.0];
diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j
index 3943126..dcdb075 100644
--- a/AppKit/CPTableView.j
+++ b/AppKit/CPTableView.j
@@ -278,9 +278,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
_retargetedDropOperation = nil;
_dragOperationDefaultMask = nil;
_destinationDragStyle = CPTableViewDraggingDestinationFeedbackStyleRegular;
+
_dropOperationFeedbackView = [[_CPDropOperationDrawingView alloc] initWithFrame:_CGRectMakeZero()];