Skip to content

Instantly share code, notes, and snippets.

@alexanderweiss
Created November 24, 2009 16:13
Show Gist options
  • Save alexanderweiss/241977 to your computer and use it in GitHub Desktop.
Save alexanderweiss/241977 to your computer and use it in GitHub Desktop.
@import <Foundation/CPObject.j>
@implementation LoginWindowController : CPObject
{
@outlet CPTextField username;
@outlet CPTextField password;
@outlet CPWindow loginWindow;
CPCib loginWindowCib;
id delegate @accessors;
}
- (id)init
{
if (self = [super init])
{
[CPBundle loadCibNamed:@"LoginWindow.cib" owner: self loadDelegate:self];
}
return self;
}
- (void)showWindow
{
[loginWindow center];
[loginWindow orderFront:self];
}
- (@action)login:(id)sender
{
[[delegate appUser] login];
}
- (void)cibDidFinishLoading:(CPCib)loginWindowCib
{
[loginWindow setShowsResizeIndicator:NO];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment