mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-14 12:34:29 +00:00
Beginnings of nib2cib support for new tableview.
Reviewed by me.
This commit is contained in:
1 parent
b12017cd51
commit
528ef4394a
17 files changed
+7260
-3252
No files matched your search
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* TableCibTest
|
||||
*
|
||||
* Created by Francisco Tolmasky on July 5, 2009.
|
||||
* Copyright 2009, 280 North, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
|
||||
}
|
||||
|
||||
- (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];
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(CPTableView)tableView
|
||||
{
|
||||
return 700000;
|
||||
}
|
||||
|
||||
- (id)tableView:(CPTableView)tableView objectValueForTableColumn:(CPTableColumn)tableColumn row:(int)row
|
||||
{
|
||||
if ([tableColumn identifier] === "icons")
|
||||
return iconImage;
|
||||
else
|
||||
return String((row + 1) * [[tableColumn identifier] intValue]);
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user