Skip to content

Instantly share code, notes, and snippets.

@lsinger
Created January 18, 2009 22:09
Show Gist options
  • Save lsinger/48787 to your computer and use it in GitHub Desktop.
Save lsinger/48787 to your computer and use it in GitHub Desktop.
/*
* AppController.j
*
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@import "AccountBarView.j"
@import "MessageListView.j"
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
var bounds = [contentView bounds];
var accountBar = [[AccountBarView alloc] initWithFrame: CGRectMake(0,0,CPRectGetWidth(bounds),200)];
[contentView addSubview: accountBar];
var messageList = [[MessageListView alloc] initWithFrame: CGRectMake(0,200,CPRectGetWidth(bounds),CGRectGetHeight(bounds)-200)];
[contentView addSubview: messageList];
[theWindow orderFront:self];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment