CPTableView with Lion's view-based API

Added : -makeViewWithIdentifier:owner:
	  -rowForView: columnForView: less performant tahn cocoa because we cycle through all visible rows. But these methods are generally used once when editing manually.
  Added identifier property to CPView.

  retro and forward (in IB) compatible with the existing API. You can use IB table view based without the new API. Existing table views / Nib won't break.

  CPTableView view based example. Featuring: IB made data views, different views in the same column, subviews binding in IB

When the view is found automatically in the cib, instantiate with _delegate as the owner (cocoa behavior).
This commit is contained in:
cacaodev committed 2012-04-13 09:19:23 +02:00
1 parent c2cad3cca3
commit 67f7649f6c
28 files changed
+3045 -47

No files matched your search

+15 -15
View File
@@ -1807,6 +1807,21 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
}
}
- (CPView)_dataViewForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRow
{
var view = nil;
if (_implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_dataViewForTableColumn_item_)
{
view = [_delegate outlineView:_outlineView
dataViewForTableColumn:aTableColumn
item:[self itemAtRow:theRow]];
if (view == nil)
[CPException raise:CPInternalInconsistencyException reason:"The view returned by -outlineView:dataViewForTableColumn:item: should not be nil"];
}
return view;
}
@end
@implementation _CPOutlineViewTableViewDelegate : CPObject
@@ -1824,21 +1839,6 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
return self;
}
- (CPView)tableView:(CPTableView)theTableView dataViewForTableColumn:(CPTableColumn)theTableColumn row:(int)theRow
{
var dataView = nil;
if ((_outlineView._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_dataViewForTableColumn_item_))
dataView = [_outlineView._outlineViewDelegate outlineView:_outlineView
dataViewForTableColumn:theTableColumn
item:[_outlineView itemAtRow:theRow]];
if (!dataView)
dataView = [theTableColumn dataViewForRow:theRow];
return dataView;
}
- (BOOL)tableView:(CPTableView)theTableView shouldSelectRow:(int)theRow
{
return SHOULD_SELECT_ITEM(_outlineView, [_outlineView itemAtRow:theRow]);
+9 -21
View File
@@ -49,7 +49,7 @@ CPTableColumnUserResizingMask = 1 << 1;
CPTableView _tableView;
CPView _headerView;
CPView _dataView;
Object _dataViewData;
CPData _dataViewData;
float _width;
float _minWidth;
@@ -83,7 +83,7 @@ CPTableColumnUserResizingMask = 1 << 1;
if (self)
{
_dataViewData = { };
_dataViewData = nil;
_width = 100.0;
_minWidth = 10.0;
@@ -392,12 +392,12 @@ CPTableColumnUserResizingMask = 1 << 1;
- (void)setDataView:(CPView)aView
{
if (_dataView)
_dataViewData[[_dataView UID]] = nil;
_dataViewData = nil;
[aView setThemeState:CPThemeStateTableDataView];
_dataView = aView;
_dataViewData[[aView UID]] = [CPKeyedArchiver archivedDataWithRootObject:aView];
_dataViewData = [CPKeyedArchiver archivedDataWithRootObject:aView];
}
- (CPView)dataView
@@ -421,24 +421,12 @@ CPTableColumnUserResizingMask = 1 << 1;
/*!
@ignore
*/
- (id)_newDataViewForRow:(int)aRowIndex
- (id)_newDataView
{
var dataView = [self dataViewForRow:aRowIndex],
dataViewUID = [dataView UID];
if (!_dataViewData)
return nil;
var x = [self tableView]._cachedDataViews[dataViewUID];
if (x && x.length)
return x.pop();
// if we haven't cached an archive of the data view, do it now
if (!_dataViewData[dataViewUID])
_dataViewData[dataViewUID] = [CPKeyedArchiver archivedDataWithRootObject:dataView];
// unarchive the data view cache
var newDataView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData[dataViewUID]];
newDataView.identifier = dataViewUID;
// make sure only we have control over the size and placement
var newDataView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData];
[newDataView setAutoresizingMask:CPViewNotSizable];
return newDataView;
@@ -723,7 +711,7 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey",
if (self)
{
_dataViewData = { };
_dataViewData = nil;
_width = [aCoder decodeFloatForKey:CPTableColumnWidthKey];
_minWidth = [aCoder decodeFloatForKey:CPTableColumnMinWidthKey];
+227 -11
View File
@@ -174,6 +174,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
Object _dataViewsForTableColumns;
Object _cachedDataViews;
CPDictionary _archivedDataViews;
//Configuring Behavior
BOOL _allowsColumnReordering;
@@ -344,6 +345,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
_exposedRows = [CPIndexSet indexSet];
_exposedColumns = [CPIndexSet indexSet];
_cachedDataViews = { };
_archivedDataViews = nil;
_cachedRowHeights = [];
_groupRows = [CPIndexSet indexSet];
@@ -1818,6 +1820,85 @@ NOT YET IMPLEMENTED
return row;
}
/*!
Returns the index of the row for the specified view.
@param view The view.
@return The index of the row corresponding to the view. Returns -1 if the view is not a dataView, or a subview of a dataView.
@discussion This is typically needed in the action method for a CPButton (or CPControl) to find out what row (and column) the action should be performed on.
The implementation is O(rxc) where r is the number of visible rows, and c is the number of visible columns, so this method should generally not be called within a loop.
*/
- (CPInteger)rowForView:(CPView)aView
{
return [self rowOrColumn:YES forView:aView];
}
/*!
Returns the index of the column for the specified view.
@param view The view.
@return The index of the column corresponding to the view. Returns -1 if the view is not a dataView, or a subview of a dataView.
@discussion This is typically needed in the action method for a CPButton (or CPControl) to find out what row (and column) the action should be performed on.
The implementation is O(rxc) where r is the number of visible rows, and c is the number of visible columns, so this method should generally not be called within a loop.
*/
- (CPInteger)columnForView:(CPView)aView
{
return [self rowOrColumn:NO forView:aView];
}
/*!
@ignore
*/
- (CPInteger)rowOrColumn:(BOOL)rowOrColumn forView:(CPView)aView
{
var cellView = aView,
contentView = [[self window] contentView];
while (1)
{
if (cellView == contentView)
{
return -1;
}
else
{
var superview = [cellView superview];
if ([superview isKindOfClass:[CPTableView class]])
{
break;
}
cellView = superview;
}
}
var exposedRows = [],
exposedColumns = [];
[_exposedRows getIndexes:exposedRows maxCount:-1 inIndexRange:nil];
[_exposedColumns getIndexes:exposedColumns maxCount:-1 inIndexRange:nil];
var colcount = exposedColumns.length,
countOfRows = exposedRows.length;
while (colcount--)
{
var column = exposedColumns[colcount],
tableColumnUID = [_tableColumns[column] UID],
dataViewsInTableColumn = _dataViewsForTableColumns[tableColumnUID],
rowcount = countOfRows;
while (rowcount--)
{
var row = exposedRows[rowcount];
if (cellView == dataViewsInTableColumn[row])
return rowOrColumn ? row : column;
}
}
return -1;
}
/*!
Returns a rect for the dataview / cell at the column and row given.
If the column or row index is greater than the number of columns or rows a CGZeroRect is returned
@@ -3070,9 +3151,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
objectValue = [_dataSource tableView:self objectValueForTableColumn:aTableColumn row:aRowIndex];
tableColumnObjectValues[aRowIndex] = objectValue;
}
else if (![self infoForBinding:@"content"])
else if (!(_implementedDataSourceMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_) && ![self infoForBinding:@"content"])
{
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement tableView:objectValueForTableColumn:row:");
CPLogConsole(@"no content binding established and data source " + [_dataSource description] + " does not implement tableView:objectValueForTableColumn:row: or tableView:dataViewForTableColumn:row:");
}
}
@@ -3242,6 +3323,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
var columnIndex = 0,
columnsCount = columnArray.length;
var shouldSetObjectValue = _implementedDataSourceMethods & CPTableViewDataSource_tableView_objectValueForTableColumn_row_;
for (; columnIndex < columnsCount; ++columnIndex)
{
var column = columnArray[columnIndex],
@@ -3267,7 +3350,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
isTextField = [dataView isKindOfClass:[CPTextField class]];
[dataView setFrame:[self frameOfDataViewAtColumn:column row:row]];
[dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]];
if (shouldSetObjectValue)
[dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]];
// This gives the table column an opportunity to apply its bindings.
// It will override the value set above if there is a binding.
@@ -3292,7 +3376,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[dataView unsetThemeState:CPThemeStateGroupRow];
}
[self setNeedsDisplay:YES]
[self setNeedsDisplay:YES];
}
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_)
@@ -3426,15 +3510,100 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
/*!
@ignore
*/
- (CPView)_newDataViewForRow:(CPInteger)aRow tableColumn:(CPTableColumn)aTableColumn
- (CPView)_dataViewForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRow
{
if ((_implementedDelegateMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_))
var view = nil;
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_)
{
var dataView = [_delegate tableView:self dataViewForTableColumn:aTableColumn row:aRow];
[aTableColumn setDataView:dataView];
view = [_delegate tableView:self dataViewForTableColumn:aTableColumn row:aRow];
if (view == nil)
[CPException raise:CPInternalInconsistencyException reason:"The view returned by -tableView:dataViewForTableColumn:row: should not be nil"];
}
return [aTableColumn _newDataViewForRow:aRow];
return view;
}
/*!
@ignore
*/
- (CPView)_newDataViewForRow:(CPInteger)aRow tableColumn:(CPTableColumn)aTableColumn
{
var view = [self _dataViewForTableColumn:aTableColumn row:aRow];
if (view == nil)
{
var columnIdentifier = [aTableColumn identifier];
// For Pre-Lion nibs, there is no automatic identifier for table column; use UID as identifier.
if (columnIdentifier == nil)
columnIdentifier = [aTableColumn UID];
view = [self makeViewWithIdentifier:columnIdentifier owner:_delegate];
if (view == nil)
view = [aTableColumn _newDataView];
[view setIdentifier:columnIdentifier];
}
return view;
}
/*
Returns a view with the specified identifier.
@param identifier The view identifier. Must not be nil.
@param owner The owner of the CIB that may be loaded and instituted to create a new view with the particular identifier.
@return A view for the row.
@discussion
Typically identifier is associated with an external CIB and the table view will automatically instantiate the CIB with the provided owner. The owner of the CIB that may be loaded and instantiated to create a new view with the particular identifier is typically the table view’s delegate. The owner is useful in setting up outlets and target and actions from the view.
This method will typically be called by the delegate in tableView:dataViewForTableColumn:row:, but it can also be overridden to provide custom views for the identifier. This method may also return a reused view with the same identifier that was no longer available on screen.
*/
- (id)makeViewWithIdentifier:(CPString)anIdentifier owner:(id)anOwner
{
if (anIdentifier == nil)
return nil;
var view,
// See if we have some reusable view available
reusableViews = _cachedDataViews[anIdentifier];
if (reusableViews && reusableViews.length)
view = reusableViews.pop();
// Otherwise see if we have a view in the cib with this identifier
else
view = [self _unarchiveViewWithIdentifier:anIdentifier owner:anOwner];
return view;
}
/*!
@ignore
*/
- (CPView)_unarchiveViewWithIdentifier:(CPString)anIdentifier owner:(id)anOwner
{
var cib = [_archivedDataViews objectForKey:anIdentifier];
if (!cib)
return nil;
var objects = [];
var load = [cib instantiateCibWithOwner:anOwner topLevelObjects:objects];
if (!load)
return nil;
var count = objects.length;
while(count--)
{
var o = objects[count];
if ([o isKindOfClass:[CPView class]])
return o;
}
return nil;
}
/*!
@@ -3446,7 +3615,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
return;
// FIXME: yuck!
var identifier = aDataView.identifier;
var identifier = [aDataView identifier];
if (!_cachedDataViews[identifier])
_cachedDataViews[identifier] = [aDataView];
@@ -4758,7 +4927,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
CPTableViewAlternatingRowColorsKey = @"CPTableViewAlternatingRowColorsKey",
CPTableViewHeaderViewKey = @"CPTableViewHeaderViewKey",
CPTableViewCornerViewKey = @"CPTableViewCornerViewKey",
CPTableViewAutosaveNameKey = @"CPTableViewAutosaveNameKey";
CPTableViewAutosaveNameKey = @"CPTableViewAutosaveNameKey",
CPTableViewArchivedReusableViewsKey = @"CPTableViewArchivedReusableViewsKey";
@implementation CPTableView (CPCoding)
@@ -4803,6 +4973,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
[self _init];
_archivedDataViews = [aCoder decodeObjectForKey:CPTableViewArchivedReusableViewsKey];
[self viewWillMoveToSuperview:[self superview]];
// Do this as late as possible to make sure the tableview is fully configured
@@ -4843,6 +5015,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
[aCoder encodeObject:_headerView forKey:CPTableViewHeaderViewKey];
[aCoder encodeObject:_autosaveName forKey:CPTableViewAutosaveNameKey];
if (_archivedDataViews)
[aCoder encodeObject:_archivedDataViews forKey:CPTableViewArchivedReusableViewsKey];
}
@end
@@ -5015,3 +5189,45 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
}
@end
//var CPTableCellViewBackgroundStyleKey = @"CPTableCellViewBackgroundStyleKey",
// CPTableCellViewRowSizeStyleKey = @"CPTableCellViewRowSizeStyleKey";
@implementation CPTableCellView : CPView
{
//int _backgroundStyle @accessors(property=backgroundStyle);
//int _rowSizeStyle @accessors(property=rowSizeStyle);
id _objectValue @accessors(property=objectValue);
CPTextField _textField @accessors(property=textField);
CPImageView _imageView @accessors(property=imageView);
}
- (void)awakeFromCib
{
[self setThemeState:CPThemeStateTableDataView];
}
- (void)setThemeState:(CPThemeState)aState
{
[super setThemeState:aState];
[self recursivelyPerformSelector:_cmd withObject:aState startingFrom:self];
}
- (void)unsetThemeState:(CPThemeState)aState
{
[super unsetThemeState:aState];
[self recursivelyPerformSelector:_cmd withObject:aState startingFrom:self];
}
- (void)recursivelyPerformSelector:(SEL)selector withObject:(id)anObject startingFrom:(id)aView
{
[[aView subviews] enumerateObjectsUsingBlock:function(view, idx)
{
[view performSelector:selector withObject:anObject];
if (![view isKindOfClass:[self class]]) // Avoid infinite loop if a subview is a CPTableCellView.
[self recursivelyPerformSelector:selector withObject:anObject startingFrom:view];
}];
}
@end
+1
View File
@@ -125,6 +125,7 @@ var CPViewFlags = { },
CPGraphicsContext _graphicsContext;
int _tag;
CPString _identifier @accessors(property=identifier);
CGRect _frame;
CGRect _bounds;
@@ -0,0 +1,79 @@
/*
* AppController.j
* CPTableViewLionCibTest
*
* Created by You on March 8, 2012.
* Copyright 2012, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
@outlet CPTableView tableView;
@outlet CPTextField textField;
CPArray content @accessors;
}
- (void)applicationDidFinishLaunching:(CPNotification)note
{
content = [CPArray new];
var path = [[CPBundle mainBundle] pathForResource:@"Data.plist"],
request = [CPURLRequest requestWithURL:path],
connection = [CPURLConnection connectionWithRequest:request delegate:self];
[theWindow setFullBridge:YES];
}
- (void)connection:(CPURLConnection)connection didReceiveData:(CPString)dataString
{
if (!dataString)
return;
var data = [[CPData alloc] initWithRawString:dataString],
theRows = [CPPropertyListSerialization propertyListFromData:data format:CPPropertyListXMLFormat_v1_0];
[self setContent:theRows];
}
- (void)tableView:(CPTableView)aTableView dataViewForTableColumn:(CPTableColumn)aTableColumn row:(int)aRow
{
var value = [[content objectAtIndex:aRow] objectForKey:[aTableColumn identifier]],
identifier = [value objectForKey:@"identifier"],
view = [aTableView makeViewWithIdentifier:identifier owner:self];
// this is equivalent of binding the valueURL binding of NSImageView in IB to view.objectValue.image
if (identifier == @"person")
{
var filename = [value objectForKey:@"image"];
if (filename == nil || filename == @"")
filename = @"na.png";
var path = [[CPBundle mainBundle] pathForResource:filename],
image = [[CPImage alloc] initByReferencingFile:path size:CGSizeMake(100,133)];
[[view imageView] setImage:image];
}
if (view == nil)
view = [[CPTableCellView alloc] initWithFrame:CGRectMakeZero()];
return view;
}
- (void)awakeFromCib
{
// Called each time a cib is instatiated because we set the owner to self. Certainly a better idea to have a separate table view delegate if you need awakeFromCib to do some initialization in the AppController.
CPLogConsole(_cmd + textField);
}
- (IBAction)_sliderAction:(id)sender
{
// Action sent from a cellView subview. You can access outlets (built-in or custom) defined in CPTableCellView or a subclass if you define the same outlets in the owner class.In this example, the owner is self.
CPLogConsole(_cmd);
}
@end
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>CPTableViewLionCibTest</string>
</dict>
</plist>
@@ -0,0 +1,94 @@
/*
* Jakefile
* CPTableViewLionCibTest
*
* Created by You on March 8, 2012.
* Copyright 2012, Your Company All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
JAKE = require("jake"),
task = JAKE.task,
FileList = JAKE.FileList,
app = require("cappuccino/jake").app,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
OS = require("os");
app ("CPTableViewLionCibTest", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "CPTableViewLionCibTest.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CPTableViewLionCibTest");
task.setIdentifier("com.yourcompany.CPTableViewLionCibTest");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("CPTableViewLionCibTest");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["CPTableViewLionCibTest"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "CPTableViewLionCibTest", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "CPTableViewLionCibTest", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "CPTableViewLionCibTest"));
OS.system(["press", "-f", FILE.join("Build", "Release", "CPTableViewLionCibTest"), FILE.join("Build", "Deployment", "CPTableViewLionCibTest")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "CPTableViewLionCibTest"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTableViewLionCibTest"), FILE.join("Build", "Desktop", "CPTableViewLionCibTest", "CPTableViewLionCibTest.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "CPTableViewLionCibTest", "CPTableViewLionCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTableViewLionCibTest"));
print("----------------------------");
}
@@ -0,0 +1,394 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>image</key>
<string>brad.jpg</string>
<key>identifier</key>
<string>person</string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>slider</key>
<integer>10</integer>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Petrograd</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string>georges.jpg</string>
<key>name</key>
<string>Georges</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>identifier</key>
<string>multiple</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string>john.jpg</string>
<key>name</key>
<string>John</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>slider</key>
<integer>10</integer>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>slider</key>
<integer>10</integer>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Robert</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Albert</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>show</key>
<true/>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Melissa</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>multiple</string>
<key>image</key>
<string>john.jpg</string>
<key>name</key>
<string>John</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>image</key>
<string>brad.jpg</string>
<key>identifier</key>
<string>person</string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>slider</key>
<integer>5</integer>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Petrograd</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string>georges.jpg</string>
<key>name</key>
<string>Georges</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>multiple</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string>john.jpg</string>
<key>name</key>
<string>John</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>slider</key>
<integer>15</integer>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Brad</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>place</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Robert</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Albert</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>person</string>
<key>image</key>
<string></string>
<key>name</key>
<string>Melissa</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
<dict>
<key>column1</key>
<dict>
<key>identifier</key>
<string>multiple</string>
<key>image</key>
<string>john.jpg</string>
<key>name</key>
<string>John</string>
</dict>
<key>column2</key>
<dict>
<key>identifier</key>
<string>text</string>
<key>value</key>
<string>TEXTTEXT</string>
</dict>
</dict>
</array>
</plist>
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;85E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;86E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;87E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;83E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;83E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;83E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;57E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;83E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;59E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;83E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;51E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;83E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;93E;E;D;K;6;$classD;K;6Line truncated
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,103 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
CPTableViewLionCibTest
Created by You on March 8, 2012.
Copyright 2012, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPTableViewLionCibTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
<script type="text/javascript">
objj_msgSend_reset();
// DEBUG OPTIONS:
// Uncomment to enable printing of backtraces on exceptions:
//objj_msgSend_decorate(objj_backtrace_decorator);
// Uncomment to supress exceptions that take place inside a message
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
// Uncomment to enable runtime type checking:
//objj_msgSend_decorate(objj_typecheck_decorator);
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPTableViewLionCibTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -0,0 +1,77 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
CPTableViewLionCibTest
Created by You on March 8, 2012.
Copyright 2012, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPTableViewLionCibTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPTableViewLionCibTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -0,0 +1,18 @@
/*
* AppController.j
* CPTableViewLionCibTest
*
* Created by You on March 8, 2012.
* Copyright 2012, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
@@ -0,0 +1,116 @@
/*
* AppController.j
* CPTableViewViewBased
*
* Created by cacaodev.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPTableView tableView;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
[self buildModel];
tableView = [[CPTableView alloc] initWithFrame:CGRectMakeZero()];
[tableView setDataSource:self];
[tableView setDelegate:self];
var columnA = [[CPTableColumn alloc] initWithIdentifier:"A"];
[tableView addTableColumn:columnA];
[[columnA headerView] setStringValue:"A"];
[columnA setWidth:175];
var columnB = [[CPTableColumn alloc] initWithIdentifier:"B"];
[tableView addTableColumn:columnB];
[[columnB headerView] setStringValue:"B"];
[columnB setWidth:175]
var columnC = [[CPTableColumn alloc] initWithIdentifier:"C"];
[tableView addTableColumn:columnC];
[[columnC headerView] setStringValue:"C"];
[columnC setWidth:175];
var columnD = [[CPTableColumn alloc] initWithIdentifier:"D"];
[tableView addTableColumn:columnD];
[[columnD headerView] setStringValue:"D"];
[columnD setWidth:175];
var columnE = [[CPTableColumn alloc] initWithIdentifier:"E"];
[tableView addTableColumn:columnE];
[[columnE headerView] setStringValue:"E"];
[columnE setWidth:175];
var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(100,100,700,400)];
[scrollView setDocumentView:tableView];
[contentView addSubview:scrollView];
[theWindow orderFront:self];
}
- (void)buildModel // For the editable view aka the slider
{
content = [];
var count = 10000;
while (count--)
content.push({A:10,B:10,C:10,D:10,E:10});
}
- (IBAction)sliderAction:(id)sender
{
var row = [tableView rowForView:sender];
var column = [tableView columnForView:sender];
var identifier = [[[tableView tableColumns] objectAtIndex:column] identifier];
//CPLogConsole(_cmd + sender + " row = " + row + " column = " + column);
content[row][identifier] = [sender value];
}
- (int)numberOfRowsInTableView:(id)aTableView
{
return content.length;
}
- (void)tableView:(CPTableView)aTableView dataViewForTableColumn:(CPTableColumn)aTableColumn row:(int)aRow
{
var n = (aRow % 3),
viewKind = "view_kind_" + n,
tableColumnId = [aTableColumn identifier];
var view = [aTableView makeViewWithIdentifier:viewKind owner:self];
if (view == nil)
{
if (n == 0)
view = [[CPTableCellView alloc] initWithFrame:CGRectMakeZero()];
else if (n == 1)
{
view = [[CPSlider alloc] initWithFrame:CGRectMakeZero()];
[view setMinValue:0];
[view setMaxValue:20];
[view setTarget:self];
[view setAction:@selector(sliderAction:)];
}
else
view = [[CPLevelIndicator alloc] initWithFrame:CGRectMakeZero()];
[view setIdentifier:viewKind];
}
if (n == 0)
[view setObjectValue:("Column " + tableColumnId + " Row " + aRow)];
else if (n == 1)
[view setValue:content[aRow][tableColumnId]];
return view;
}
@end
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CPApplicationDelegateClass</key>
<string>AppController</string>
<key>CPBundleName</key>
<string>CPTableViewViewBased</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
</dict>
</plist>
@@ -0,0 +1,93 @@
/*
* Jakefile
* CPTableViewViewBased
*
* Created by You on August 11, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
JAKE = require("jake"),
task = JAKE.task,
FileList = JAKE.FileList,
app = require("cappuccino/jake").app,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
OS = require("os");
app ("CPTableViewViewBased", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "CPTableViewViewBased.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CPTableViewViewBased");
task.setIdentifier("com.yourcompany.CPTableViewViewBased");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("CPTableViewViewBased");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["CPTableViewViewBased"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "CPTableViewViewBased", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "CPTableViewViewBased", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "CPTableViewViewBased"));
OS.system(["press", "-f", FILE.join("Build", "Release", "CPTableViewViewBased"), FILE.join("Build", "Deployment", "CPTableViewViewBased")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "CPTableViewViewBased"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTableViewViewBased"), FILE.join("Build", "Desktop", "CPTableViewViewBased", "CPTableViewViewBased.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "CPTableViewViewBased", "CPTableViewViewBased.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTableViewViewBased"));
print("----------------------------");
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,103 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
CPTableViewViewBased
Created by You on August 11, 2010.
Copyright 2010, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPTableViewViewBased</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>
<script src="Frameworks/Debug/Objective-J/Objective-J.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
objj_msgSend_reset();
// DEBUG OPTIONS:
// Uncomment to enable printing of backtraces on exceptions:
//objj_msgSend_decorate(objj_backtrace_decorator);
// Uncomment to supress exceptions that take place inside a message
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
// Uncomment to enable runtime type checking:
//objj_msgSend_decorate(objj_typecheck_decorator);
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPTableViewViewBased...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -0,0 +1,78 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
CPTableViewViewBased
Created by You on August 11, 2010.
Copyright 2010, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPTableViewViewBased</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPTableViewViewBased...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -0,0 +1,18 @@
/*
* AppController.j
* CPTableViewViewBased
*
* Created by You on August 11, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
+2
View File
@@ -44,6 +44,7 @@
@import "NSMatrix.j"
@import "NSMenu.j"
@import "NSMenuItem.j"
@import "NSNib.j"
@import "NSNibConnector.j"
@import "NSObjectController.j"
@import "NSOutlineView.j"
@@ -61,6 +62,7 @@
@import "NSSplitView.j"
@import "NSStepper.j"
@import "NSTableColumn.j"
@import "NSTableCellView.j"
@import "NSTableHeaderView.j"
@import "NSTableView.j"
@import "NSTabView.j"
+29
View File
@@ -0,0 +1,29 @@
@import <AppKit/CPTableView.j>
@implementation CPTableCellView (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
{
self = [super NS_initWithCoder:aCoder];
return self;
}
@end
@implementation NSTableCellView : CPTableCellView
{
}
- (id)initWithCoder:(CPCoder)aCoder
{
return [self NS_initWithCoder:aCoder];
}
- (Class)classForKeyedArchiver
{
return [CPTableCellView class];
}
@end
+2
View File
@@ -55,6 +55,8 @@
_tableColumns = [aCoder decodeObjectForKey:@"NSTableColumns"];
[_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self];
_archivedDataViews = [aCoder decodeObjectForKey:@"NSTableViewArchivedReusableViewsKey"];
_intercellSpacing = CGSizeMake([aCoder decodeFloatForKey:@"NSIntercellSpacingWidth"],
[aCoder decodeFloatForKey:@"NSIntercellSpacingHeight"]);