Skip to content

Instantly share code, notes, and snippets.

@dbrajkovic
Created March 22, 2011 05:09
Show Gist options
  • Save dbrajkovic/880810 to your computer and use it in GitHub Desktop.
Save dbrajkovic/880810 to your computer and use it in GitHub Desktop.
@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