Created
March 22, 2011 05:09
-
-
Save dbrajkovic/880810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <AppKit/AppKit.j> | |
@import <Foundation/Foundation.j> | |
@implementation STSplitView : CPSplitView | |
{ | |
} | |
- (id)initWithFrame:(CGRect)frame { | |
self = [super initWithFrame:frame]; | |
if (self) { | |
[self setVertical:NO]; | |
[self registerForDraggedTypes: | |
[CPArray arrayWithObject:AppBadgeViewDragType]]; | |
} | |
return self; | |
} | |
- (void)performDragOperation:(CPDraggingInfo)aSender | |
{ | |
console.log("drag it"); | |
var aView = [[CPView alloc] initWithFrame:CGRectMake(0,0,50,50)]; | |
[aView setBackgroundColor:[CPColor redColor]]; | |
[self addSubview:aView]; | |
[self setNeedsDisplay:YES]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment