Skip to content

Instantly share code, notes, and snippets.

@jfahrenkrug
Created February 2, 2010 15:13
Show Gist options
  • Save jfahrenkrug/292731 to your computer and use it in GitHub Desktop.
Save jfahrenkrug/292731 to your computer and use it in GitHub Desktop.
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
@outlet CPTextField nameTextField;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (void)awakeFromCib
{
// This is called when the cib is done loading.
// You can implement this method on any object instantiated from a Cib.
// It's a useful hook for setting up current UI values, and other things.
// In this case, we want the window from Cib to become our full browser window
//[theWindow setFullBridge:YES];
}
- (@action)sayHi:(id)sender
{
alert("Hello " + [nameTextField stringValue]);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment