Compare commits

..
16 Commits
Author SHA1 Message Date
Francisco Ryan Tolmasky I 6a735ecda9 Merge branch 'master' of github.com:280north/cappuccino 2011-01-23 08:44:01 -08:00
Francisco Ryan Tolmasky I aada884cff A few import fixes.
Reviewed by me.
2011-01-23 08:43:46 -08:00
Paul Baumgart b62789bb18 Check for one of curl or wget. 2011-01-21 17:35:33 -08:00
Paul Baumgart eafec339f1 Minor update to bootstrap to have it check to make sure java is installed. 2011-01-21 16:49:32 -08:00
Alexander Ljungberg ef326dbbb4 Fix an accidental global, whitespace. 2011-01-20 22:33:42 -03:00
Alexander Ljungberg 4bbbcb15f1 Array controller documentation. 2011-01-20 22:27:09 -03:00
Alexander Ljungberg 92cb69b623 Merge branch 'CPArrayControllerFixes' of https://github.com/cacaodev/cappuccino into cacaodev-CPArrayControllerFixes 2011-01-20 22:14:17 -03:00
Alexander Ljungberg 18ea086ffc Removed unused Aristo files. 2011-01-20 22:13:01 -03:00
Alexander Ljungberg 40b04b7956 Merge branch 'master' of github.com:280north/cappuccino into cacaodev-CPTableColumnValueBinder
Conflicts:
	AppKit/CPTableColumn.j
2011-01-20 21:56:30 -03:00
Francisco Ryan Tolmasky I 38dc125fc2 Fix CPSubclassableDictionaryTest.
Reviewed by me.
2011-01-20 09:50:32 -08:00
Francisco Ryan Tolmasky I 378df68995 Merge branch 'master' of github.com:280north/cappuccino 2011-01-20 09:17:29 -08:00
Francisco Ryan Tolmasky I ec330a1090 Fix for pop up not reflecting changes in individual menu items.
Reviewed by me.
2011-01-20 09:07:04 -08:00
Randall Luecke f07543045a Doc fixes and more docs in the tableview. 2011-01-20 03:07:01 -05:00
cacaodev 235b323658 Add CPTableColumnValueBinder. This binder subclass just reloads the table column when a table column's value binding is updated because of a change in the bound-to object.
TableBindings test.
2011-01-19 19:56:46 +01:00
cacaodev 54c3cc0187 CPArrayController & nib2cib: added _automaticallyRearrangeObjects flag (not used currently).
_sortDescriptors initial value is an emty array (like in cocoa), not nil;
Added shared _init with default values, added missing accessors.
2011-01-19 19:26:21 +01:00
cacaodev 59cc590b51 CPArrayController -setContent: fixed a bug where objects where not rearranged if clearsFilterPredicateOnInsertion == YES and filterPredicate == nil. 2011-01-19 19:26:01 +01:00
33 changed files with 10364 additions and 100 deletions
+1
View File
@@ -21,6 +21,7 @@
*/
@import <Foundation/CPObject.j>
@import <Foundation/CPTimer.j>
@import "CAMediaTimingFunction.j"
+105 -13
View File
@@ -46,10 +46,12 @@
BOOL _selectsInsertedObjects;
BOOL _alwaysUsesMultipleValuesMarker;
id _selectionIndexes;
id _sortDescriptors;
id _filterPredicate;
id _arrangedObjects;
BOOL _automaticallyRearrangesObjects; // FIXME: Not in use
CPIndexSet _selectionIndexes;
CPArray _sortDescriptors;
CPPredicate _filterPredicate;
CPArray _arrangedObjects;
}
+ (void)initialize
@@ -116,13 +118,29 @@
if (self)
{
_sortDescriptors = [CPArray array];
_selectionIndexes = [CPIndexSet indexSet];
_preservesSelection = YES;
_selectsInsertedObjects = YES;
_avoidsEmptySelection = YES;
_clearsFilterPredicateOnInsertion = YES;
_alwaysUsesMultipleValuesMarker = NO;
_automaticallyRearrangesObjects = NO;
_filterRestrictsInsertion = YES; // FIXME: Not in use
[self _init];
}
return self;
}
- (void)_init
{
_sortDescriptors = [CPArray array];
_filterPredicate = nil;
_selectionIndexes = [CPIndexSet indexSet];
_arrangedObjects = nil;
}
- (void)prepareContent
{
[self _setContentArray:[[self newObject]]];
@@ -156,7 +174,7 @@
/*!
Sets whether the controller will automatically select objects as they are inserted.
@return BOOL aFlag - YES if new objects are selected, otherwise NO.
@return BOOL - YES if new objects are selected, otherwise NO.
*/
- (void)setSelectsInsertedObjects:(BOOL)value
{
@@ -164,7 +182,7 @@
}
/*!
@return BOOL aFlag - Returns YES if the controller should try to avoid an empty selection otherwise NO.
@return BOOL - YES if the controller should try to avoid an empty selection otherwise NO.
*/
- (BOOL)avoidsEmptySelection
{
@@ -180,6 +198,76 @@
_avoidsEmptySelection = value;
}
/*!
Whether the receiver will clear its filter predicate when a new object is inserted.
@return BOOL YES if the receiver clears filter predicates on insert
*/
- (BOOL)clearsFilterPredicateOnInsertion
{
return _clearsFilterPredicateOnInsertion;
}
/*!
Sets whether the receiver should clear its filter predicate when a new object is inserted.
@param BOOL YES if the receiver should clear filter predicates on insert
*/
- (void)setClearsFilterPredicateOnInsertion:(BOOL)aFlag
{
_clearsFilterPredicateOnInsertion = aFlag;
}
/*!
Whether the receiver will always return the multiple values marker when multiple
items are selected, even if the items have the same value.
@return BOOL YES if the receiver always uses the multiple values marker
*/
- (BOOL)alwaysUsesMultipleValuesMarker
{
return _alwaysUsesMultipleValuesMarker;
}
/*!
Sets whether the receiver should always return the multiple values marker when multiple
items are selected, even if the items have the same value.
@param BOOL aFlag YES if the receiver should always use the multiple values marker
*/
- (void)setAlwaysUsesMultipleValuesMarker:(BOOL)aFlag
{
_alwaysUsesMultipleValuesMarker = aFlag;
}
/*!
Whether the receiver will rearrange its contents automatically whenever the sort
descriptors or filter predicates are changed.
NOTE: not yet implemented. Cappuccino always act as if this value was YES.
@return BOOL YES if the receiver will automatically rearrange its content on new sort
descriptors or filter predicates
*/
- (BOOL)automaticallyRearrangesObjects
{
return _automaticallyRearrangesObjects;
}
/*!
Sets whether the receiver should rearrange its contents automatically whenever the sort
descriptors or filter predicates are changed.
NOTE: not yet implemented. Cappuccino always act as if this value was YES.
@param BOOL YES if the receiver should automatically rearrange its content on new sort
descriptors or filter predicates
*/
- (void)setAutomaticallyRearrangesObjects:(BOOL)aFlag
{
_automaticallyRearrangesObjects = aFlag;
}
/*!
Sets the controller's content object.
@@ -220,7 +308,7 @@
// We need to be in control of when notifications fire.
_contentObject = value;
if (_clearsFilterPredicateOnInsertion)
if (_clearsFilterPredicateOnInsertion && _filterPredicate != nil)
[self __setFilterPredicate:nil]; // Causes a _rearrangeObjects.
else
[self _rearrangeObjects];
@@ -280,7 +368,7 @@
var filterPredicate = [self filterPredicate],
sortDescriptors = [self sortDescriptors];
if (filterPredicate && sortDescriptors)
if (filterPredicate && [sortDescriptors count] > 0)
{
var sortedObjects = [objects filteredArrayUsingPredicate:filterPredicate];
[sortedObjects sortUsingDescriptors:sortDescriptors];
@@ -288,7 +376,7 @@
}
else if (filterPredicate)
return [objects filteredArrayUsingPredicate:filterPredicate];
else if (sortDescriptors)
else if ([sortDescriptors count] > 0)
return [objects sortedArrayUsingDescriptors:sortDescriptors];
return [objects copy];
@@ -338,7 +426,7 @@
if (_arrangedObjects === value)
return;
_arrangedObjects = [[_CPObservableArray alloc] initWithArray:value];
_arrangedObjects = [[_CPObservableArray alloc] initWithArray:value];
}
/*!
@@ -829,7 +917,8 @@ var CPArrayControllerAvoidsEmptySelection = @"CPArrayControllerAvoid
CPArrayControllerFilterRestrictsInsertion = @"CPArrayControllerFilterRestrictsInsertion",
CPArrayControllerPreservesSelection = @"CPArrayControllerPreservesSelection",
CPArrayControllerSelectsInsertedObjects = @"CPArrayControllerSelectsInsertedObjects",
CPArrayControllerAlwaysUsesMultipleValuesMarker = @"CPArrayControllerAlwaysUsesMultipleValuesMarker";
CPArrayControllerAlwaysUsesMultipleValuesMarker = @"CPArrayControllerAlwaysUsesMultipleValuesMarker",
CPArrayControllerAutomaticallyRearrangesObjects = @"CPArrayControllerAutomaticallyRearrangesObjects";
@implementation CPArrayController (CPCoding)
@@ -845,6 +934,8 @@ var CPArrayControllerAvoidsEmptySelection = @"CPArrayControllerAvoid
_preservesSelection = [aCoder decodeBoolForKey:CPArrayControllerPreservesSelection];
_selectsInsertedObjects = [aCoder decodeBoolForKey:CPArrayControllerSelectsInsertedObjects];
_alwaysUsesMultipleValuesMarker = [aCoder decodeBoolForKey:CPArrayControllerAlwaysUsesMultipleValuesMarker];
_automaticallyRearrangesObjects = [aCoder decodeBoolForKey:CPArrayControllerAutomaticallyRearrangesObjects];
_sortDescriptors = [CPArray array];
if (![self content] && [self automaticallyPreparesContent])
[self prepareContent];
@@ -865,6 +956,7 @@ var CPArrayControllerAvoidsEmptySelection = @"CPArrayControllerAvoid
[aCoder encodeBool:_preservesSelection forKey:CPArrayControllerPreservesSelection];
[aCoder encodeBool:_selectsInsertedObjects forKey:CPArrayControllerSelectsInsertedObjects];
[aCoder encodeBool:_alwaysUsesMultipleValuesMarker forKey:CPArrayControllerAlwaysUsesMultipleValuesMarker];
[aCoder encodeBool:_automaticallyRearrangesObjects forKey:CPArrayControllerAutomaticallyRearrangesObjects];
}
- (void)awakeFromCib
+6 -1
View File
@@ -54,7 +54,12 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
+ (CPSet)keyPathsForValuesAffectingSelectedTag
{
return [CPSet setWithObject:@"selectedIndex"];
return [CPSet setWithObject:@"objectValue"];
}
+ (CPSet)keyPathsForValuesAffectingSelectedItem
{
return [CPSet setWithObject:@"objectValue"];
}
/*!
+75 -18
View File
@@ -40,6 +40,9 @@ CPTableColumnUserResizingMask = 1 << 1;
A CPTableColumn determines its own size constrains and resizing behaviour.
The default dataview is a CPTextField but you can set it to any view you'd like. See -setDataView: for documentaion including theme states.
To customize the text of the column header you can simply call setStringValue: on the headerview of a table column.
For example: [[myTableColumn headerView] setStringValue:"My Title"];
*/
@implementation CPTableColumn : CPObject
{
@@ -62,11 +65,6 @@ CPTableColumnUserResizingMask = 1 << 1;
BOOL _disableResizingPosting @accessors(property=disableResizingPosting);
}
+ (Class)_binderClassForBinding:(CPString)theBinding
{
return [CPBinder class];
}
/*!
@ignore
*/
@@ -197,7 +195,7 @@ CPTableColumnUserResizingMask = 1 << 1;
}
/*!
Sets the minimum width of the column.
Sets the minimum width of the column.
Default value is 10.
*/
- (void)setMinWidth:(float)aMinWidth
@@ -225,7 +223,7 @@ CPTableColumnUserResizingMask = 1 << 1;
}
/*!
Sets the maximum width of the table column.
Sets the maximum width of the table column.
Default value is: 1000000
*/
- (void)setMaxWidth:(float)aMaxWidth
@@ -254,7 +252,7 @@ CPTableColumnUserResizingMask = 1 << 1;
/*!
<pre>
Set the resizing mask of the column.
Set the resizing mask of the column.
By default the column can be resized automatically with the tableview and manaully by the user
Possible masking values are:
@@ -278,7 +276,7 @@ CPTableColumnUserResizingMask = 1 << 1;
}
/*!
Sizes the column to fix the column header text.
Sizes the column to fix the column header text.
*/
- (void)sizeToFit
{
@@ -296,7 +294,12 @@ CPTableColumnUserResizingMask = 1 << 1;
/*!
Sets the header view for the column.
The headerview handles the display of sort indicators, text, etc
The headerview handles the display of sort indicators, text, etc.
If you do not want a headerview for you table you should call setHeaderView: on your CPTableView instance.
Passing nil here will throw an exception.
In order to customize the text of the column header see - (CPView)headerView;
*/
- (void)setHeaderView:(CPView)aView
{
@@ -312,7 +315,10 @@ CPTableColumnUserResizingMask = 1 << 1;
}
/*!
Returns the headerview for the column
Returns the headerview for the column.
In order to change the text of the headerview for a column you should call setStringValue: on the headerview.
For example: [[myTableColumn headerView] setStringValue:"My Column"];
*/
- (CPView)headerView
{
@@ -468,7 +474,7 @@ CPTableColumnUserResizingMask = 1 << 1;
}
/*!
Sets the sort descriptor prototype for the column.
Sets the sort descriptor prototype for the column.
*/
- (void)setSortDescriptorPrototype:(CPSortDescriptor)aSortDescriptor
{
@@ -541,7 +547,40 @@ CPTableColumnUserResizingMask = 1 << 1;
@end
@implementation CPTableColumnValueBinder : CPBinder
{
}
- (void)setValueFor:(CPString)aBinding
{
var tableView = [_source tableView],
column = [[tableView tableColumns] indexOfObjectIdenticalTo:_source],
rowIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [tableView numberOfRows])],
columnIndexes = [CPIndexSet indexSetWithIndex:column];
[tableView reloadDataForRowIndexes:rowIndexes columnIndexes:columnIndexes];
}
@end
@implementation CPTableColumn (Bindings)
+ (id)_binderClassForBinding:(CPString)aBinding
{
if (aBinding == CPValueBinding)
return [CPTableColumnValueBinder class];
return [super _binderClassForBinding:aBinding];
}
/*!
Binds the reciever to an object.
@param CPString aBinding - The binding you wish to make. Typically CPValueBinding.
@param id anObject - The object to bind the reciever to.
@param CPString aKeyPath - The key path you wish to bind the reciver to.
@param CPDictionary options - A dictionary of options for the binding. This paramater is optional, pass nil if you do not wish to use it.
*/
- (void)bind:(CPString)aBinding toObject:(id)anObject withKeyPath:(CPString)aKeyPath options:(CPDictionary)options
{
[super bind:aBinding toObject:anObject withKeyPath:aKeyPath options:options];
@@ -550,6 +589,9 @@ CPTableColumnUserResizingMask = 1 << 1;
[[self tableView] _establishBindingsIfUnbound:anObject];
}
/*!
@ignore
*/
- (void)prepareDataView:(CPView)aDataView forRow:(unsigned)aRow
{
var bindingsDictionary = [CPBinder allBindingsForObject:self],
@@ -601,11 +643,6 @@ CPTableColumnUserResizingMask = 1 << 1;
// return nil;
//}
- (void)setValue:(CPArray)content
{
[[self tableView] reloadData];
}
@end
var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey",
@@ -621,6 +658,9 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey",
@implementation CPTableColumn (CPCoding)
/*!
@ignore
*/
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super init];
@@ -648,6 +688,9 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey",
return self;
}
/*!
@ignore
*/
- (void)encodeWithCoder:(CPCoder)aCoder
{
[aCoder encodeObject:_identifier forKey:CPTableColumnIdentifierKey];
@@ -669,31 +712,45 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey",
@end
@implementation CPTableColumn (NSInCompatibility)
/*!
@ignore
*/
- (void)setHeaderCell:(CPView)aView
{
[CPException raise:CPUnsupportedMethodException
reason:@"setHeaderCell: is not supported. Use -setHeaderView:aView instead."];
}
/*!
@ignore
*/
- (CPView)headerCell
{
[CPException raise:CPUnsupportedMethodException
reason:@"headCell is not supported. Use -headerView instead."];
}
/*!
@ignore
*/
- (void)setDataCell:(CPView)aView
{
[CPException raise:CPUnsupportedMethodException
reason:@"setDataCell: is not supported. Use -setDataView:aView instead."];
}
/*!
@ignore
*/
- (CPView)dataCell
{
[CPException raise:CPUnsupportedMethodException
reason:@"dataCell is not supported. Use -dataView instead."];
}
/*!
@ignore
*/
- (id)dataCellForRow:(int)row
{
[CPException raise:CPUnsupportedMethodException
+27 -4
View File
@@ -147,7 +147,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
All delegate and data source methods are documented in the setDataSource: and setDelegate: methods.
If you want to display something other than just text in the table you should call setDataView: on a CPColumn object. More documentation in that class including theme states.
If you want to display something other than just text in the table you should call setDataView: on a CPTableColumn object. More documentation in that class including theme states.
Note: CPTableView does not contain its own scrollview. You should be sure you place the tableview in a CPScrollView on your own.
*/
@implementation CPTableView : CPControl
{
@@ -577,6 +579,11 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
_allowsMultipleSelection = !!shouldAllowMultipleSelection;
}
/*!
Returns YES if the tableview is allowed to have multiple selections, otherwise NO.
@return BOOL - YES if the tableview is allowed to have multiple selections otherwise NO.
*/
- (BOOL)allowsMultipleSelection
{
return _allowsMultipleSelection;
@@ -1453,7 +1460,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
}
/*!
Returns the headerview for the receiver. The headerview contains column headerviews for each table column
Returns the headerview for the receiver. The headerview contains column headerviews for each table column.
*/
- (CPView)headerView
{
@@ -1462,8 +1469,11 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
Sets the headerview for the tableview. This is the container view for the table column header views
Sets the headerview for the tableview. This is the container view for the table column header views.
This view also handles events for resizing and dragging.
If you dont want your tableview to have a headerview you should pass nil. (also see setCornerView:)
If you're looking to customize the header text of a column see CPTableColumn's -(CPView)headerView; method.
*/
- (void)setHeaderView:(CPView)aHeaderView
{
@@ -2683,7 +2693,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
}
/*!
Computes and returns a view to use for dragging
Computes and returns a view to use for dragging. By default this is a slighly transparent copy of the dataviews which are being dragged.
You can override this in a subclas to show different dragging feedback. Additionally you can return nil from this method and implement:
- (CPImage)dragImageForRowsWithIndexes:tableColumns:event:offset: - if you want to return a simple image.
@param dragRows an index set with the dragged row indexes
@param theTableColumns an array of the table columns which are being dragged
@@ -2814,6 +2826,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
<pre>
Sets the feedback style for when the table is the destination of a drag operation.
This style is used to determine how the tableview looks when it is the reciever of a drag and drop operation.
Can be:
CPTableViewDraggingDestinationFeedbackStyleNone
CPTableViewDraggingDestinationFeedbackStyleRegular
@@ -3391,6 +3405,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
Draws the background in a given clip rect.
This method should only be overridden if you want something other than a solid color or alternating row colors.
NOTE: this method should not be called directly, instead use setNeedsDisplay:
*/
- (void)drawBackgroundInClipRect:(CGRect)aRect
{
@@ -3444,6 +3460,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
Draws the grid for the tableview based on the set grid mask in a given clip rect.
NOTE: this method should not be called directly, instead use setNeedsDisplay:
*/
- (void)drawGridInClipRect:(CGRect)aRect
{
@@ -3519,6 +3536,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
/*!
Draws the selection with the set selection highlight style in a given clip rect.
You can change the highlight style to a source list style gradient in setSelectionHighlightStyle:
NOTE: this method should not be called directly, instead use setNeedsDisplay:
*/
- (void)highlightSelectionInClipRect:(CGRect)aRect
{
@@ -4089,6 +4108,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
[self _draggingEnded];
}
/*!
@ignore
*/
- (void)_draggingEnded
{
_retargetedDropOperation = nil;
@@ -4096,6 +4118,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
_draggedRowIndexes = [CPIndexSet indexSet];
[_dropOperationFeedbackView removeFromSuperview];
}
/*
@ignore
*/
+6 -6
View File
@@ -509,7 +509,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
var contentRect = [self contentRectForBounds:[self bounds]],
verticalAlign = [self currentValueForThemeAttribute:"vertical-alignment"];
switch(verticalAlign)
switch (verticalAlign)
{
case CPTopVerticalTextAlignment:
var topPoint = (_CGRectGetMinY(contentRect) + 1) + "px"; // for the same reason we have a -1 for the left, we also have a + 1 here
@@ -528,7 +528,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
break;
}
element.style.top = topPoint;
element.style.top = topPoint;
element.style.left = (_CGRectGetMinX(contentRect) - 1) + "px"; // why -1?
element.style.width = _CGRectGetWidth(contentRect) + "px";
element.style.height = font._lineHeight + "px"; // private ivar for the line height of the DOM text at this particaulr size
@@ -719,11 +719,11 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
/*!
Invoke the action specified by aSelector on the current responder.
This is implemented by CPResponder and by default it passes any unrecignized
actions on to the next responder but text fields appearently aren't supposed
This is implemented by CPResponder and by default it passes any unrecignized
actions on to the next responder but text fields appearently aren't supposed
to do that according to this documentation by Apple:
http://developer.apple.com/mac/library/documentation/cocoa/reference/NSTextInputClient_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSTextInputClient/doCommandBySelector:
*/
- (void)doCommandBySelector:(SEL)aSelector
+3 -3
View File
@@ -12,15 +12,15 @@
- (id)initForReadingWithData:(CPData)data bundle:(CPBundle)aBundle awakenCustomResources:(BOOL)shouldAwakenCustomResources
{
self = [super initForReadingWithData:data];
if (self)
{
_bundle = aBundle;
_awakenCustomResources = shouldAwakenCustomResources;
[self setDelegate:self];
}
return self;
}
+24 -24
View File
@@ -5,19 +5,19 @@
@import "CPWindow.j"
var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
_CPCibWindowTemplateMaxSizeKey = @"_CPCibWindowTemplateMaxSizeKey",
_CPCibWindowTemplateViewClassKey = @"_CPCibWindowTemplateViewClassKey",
_CPCibWindowTemplateWindowClassKey = @"_CPCibWindowTemplateWindowClassKey",
_CPCibWindowTemplateWindowRectKey = @"_CPCibWindowTemplateWindowRectKey",
_CPCibWindowTemplateWindowStyleMaskKey = @"_CPCibWindowTempatStyleMaskKey",
_CPCibWindowTemplateWindowTitleKey = @"_CPCibWindowTemplateWindowTitleKey",
_CPCibWindowTemplateWindowViewKey = @"_CPCibWindowTemplateWindowViewKey",
var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
_CPCibWindowTemplateMaxSizeKey = @"_CPCibWindowTemplateMaxSizeKey",
_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop = @"_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop";
_CPCibWindowTemplateWindowIsFullPlatformWindowKey = @"_CPCibWindowTemplateWindowIsFullPlatformWindowKey";
_CPCibWindowTemplateViewClassKey = @"_CPCibWindowTemplateViewClassKey",
_CPCibWindowTemplateWindowClassKey = @"_CPCibWindowTemplateWindowClassKey",
_CPCibWindowTemplateWindowRectKey = @"_CPCibWindowTemplateWindowRectKey",
_CPCibWindowTemplateWindowStyleMaskKey = @"_CPCibWindowTempatStyleMaskKey",
_CPCibWindowTemplateWindowTitleKey = @"_CPCibWindowTemplateWindowTitleKey",
_CPCibWindowTemplateWindowViewKey = @"_CPCibWindowTemplateWindowViewKey",
_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop = @"_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop",
_CPCibWindowTemplateWindowIsFullPlatformWindowKey = @"_CPCibWindowTemplateWindowIsFullPlatformWindowKey";
@implementation _CPCibWindowTemplate : CPObject
{
@@ -60,27 +60,27 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinS
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super init];
if (self)
{
if ([aCoder containsValueForKey:_CPCibWindowTemplateMinSizeKey])
_minSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMinSizeKey];
if ([aCoder containsValueForKey:_CPCibWindowTemplateMaxSizeKey])
_maxSize = [aCoder decodeSizeForKey:_CPCibWindowTemplateMaxSizeKey];
_viewClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateViewClassKey];
_windowClass = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowClassKey];
_windowRect = [aCoder decodeRectForKey:_CPCibWindowTemplateWindowRectKey];
_windowStyleMask = [aCoder decodeIntForKey:_CPCibWindowTemplateWindowStyleMaskKey];
_windowTitle = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowTitleKey];
_windowView = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowViewKey];
_windowAutorecalculatesKeyViewLoop = !![aCoder decodeObjectForKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop];
_windowIsFullPlatformWindow = !![aCoder decodeObjectForKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey];
}
return self;
}
@@ -90,13 +90,13 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinS
[aCoder encodeSize:_minSize forKey:_CPCibWindowTemplateMinSizeKey];
if (_maxSize)
[aCoder encodeSize:_maxSize forKey:_CPCibWindowTemplateMaxSizeKey];
[aCoder encodeObject:_viewClass forKey:_CPCibWindowTemplateViewClassKey];
[aCoder encodeObject:_windowClass forKey:_CPCibWindowTemplateWindowClassKey];
[aCoder encodeRect:_windowRect forKey:_CPCibWindowTemplateWindowRectKey];
[aCoder encodeInt:_windowStyleMask forKey:_CPCibWindowTemplateWindowStyleMaskKey];
[aCoder encodeObject:_windowTitle forKey:_CPCibWindowTemplateWindowTitleKey];
[aCoder encodeObject:_windowView forKey:_CPCibWindowTemplateWindowViewKey];
@@ -126,13 +126,13 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinS
- (id)_cibInstantiate
{
var windowClass = CPClassFromString([self windowClass]);
/* if (!windowClass)
[NSException raise:NSInvalidArgumentException format:@"Unable to locate NSWindow class %@, using NSWindow",_windowClass];
class=[NSWindow class];*/
var theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask];
if (_minSize)
[theWindow setMinSize:_minSize];
if (_maxSize)
@@ -147,7 +147,7 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinS
[theWindow setContentView:_windowView];
[_windowView setAutoresizesSubviews:YES];
if ([_viewClass isKindOfClass:[CPToolbar class]])
{
[theWindow setToolbar:_viewClass];
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

+1
View File
@@ -231,6 +231,7 @@ var _builtInCharacterSets = {};
- (BOOL)hasMemberInPlane:(int)plane // TO DO : when inverted
{
// FIXME: range is undefined... don't know what's supposed to be going on here.
// the highest Unicode plane we reach.
// (There are 65536 code points in each plane.)
var maxPlane = Math.floor((range.start + range.length - 1) / 65536); // FIXME: should iterate _ranges
+2
View File
@@ -23,10 +23,12 @@
@import "CPArray.j"
@import "CPDictionary.j"
@import "CPException.j"
@import "CPIndexSet.j"
@import "CPNull.j"
@import "CPObject.j"
@import "CPSet.j"
CPUndefinedKeyException = @"CPUndefinedKeyException";
CPTargetObjectUserInfoKey = @"CPTargetObjectUserInfoKey";
CPUnknownUserInfoKey = @"CPUnknownUserInfoKey";
+2
View File
@@ -20,8 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import "CPException.j"
@import "CPObject.j"
CPPropertyListUnknownFormat = 0;
CPPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat;
CPPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0;
+1 -1
View File
@@ -102,7 +102,7 @@ CPWebDAVManagerNonCollectionResourceType = 0;
}
if (!aBlock)
return makeContents(aURL, response);
return makeContents(aURL, [self PROPFIND:aURL properties:properties depth:1 block:nil]);
[self PROPFIND:aURL properties:properties depth:1 block:function(aURL, response)
{
+11 -5
View File
@@ -253,18 +253,24 @@ task ("demos", function()
// Testing
task("test", ["CommonJS", "test-only"]);
task("test", ["CommonJS", "test-only", "check-missing-imports"]);
task("test-only", function()
{
var tests = new FileList('Tests/**/*Test.j');
var cmd = ["ojtest"].concat(tests.items());
var tests = new FileList('Tests/**/*Test.j'),
cmd = ["ojtest"].concat(tests.items()),
code = OS.system(serializedENV() + " " + cmd.map(OS.enquote).join(" "));
var code = OS.system(serializedENV() + " " + cmd.map(OS.enquote).join(" "));
if (code !== 0)
OS.exit(code);
});
OS.system(serializedENV() + " " + ["js", "Tests/DetectMissingImports.js"].map(OS.enquote).join(" "));
task("check-missing-imports", function()
{
var code = OS.system(serializedENV() + " " + ["js", "Tests/DetectMissingImports.js"].map(OS.enquote).join(" "));
if (code !== 0)
OS.exit(code);
});
task("push-packages", ["push-cappuccino", "push-objective-j"]);
+12 -2
View File
@@ -1,5 +1,6 @@
@import <AppKit/CPArrayController.j>
@import <AppKit/CPTextField.j>
@implementation CPArrayControllerTest : OJTestCase
{
@@ -190,8 +191,7 @@
[arrayController setContent:newContent];
[self assert:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 2)] equals:[arrayController selectionIndexes]
message:@"last object cannot be selected"];
[self assert:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 2)] equals:[arrayController selectionIndexes] message:@"last object cannot be selected"];
}
- (void)testContentBinding
@@ -354,6 +354,16 @@
[self assert:@"Building 1" equals:[[self arrayController] valueForKeyPath:@"selection.department.building"]];
}
- (void)testArrangedObjectsNotEmptyAfterSetContentWhenClearsFilterOnInsertionIsTrue
{
var arrayController = [[CPArrayController alloc] init];
[arrayController setFilterPredicate:nil];
[arrayController setClearsFilterPredicateOnInsertion:YES];
[arrayController setContent:[CPArray arrayWithObject:@"a"]];
[self assertTrue:[[arrayController arrangedObjects] count] > 0];
}
- (void)observeValueForKeyPath:keyPath
ofObject:anActivity
change:change
+67
View File
@@ -83,6 +83,73 @@
[self assert:NO equals:[[pullDownButton itemAtIndex:1] isHidden]];
}
- (void)testMenuItemSynchronization
{
var popUpButton = [[CPPopUpButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 28.0) pullsDown:NO];
[popUpButton addItemWithTitle:@"zero"];
[popUpButton addItemWithTitle:@"one"];
[popUpButton addItemWithTitle:@"two"];
[popUpButton addItemWithTitle:@"three"];
[popUpButton addItemWithTitle:@"four"];
[popUpButton addItemWithTitle:@"five"];
[popUpButton addItemWithTitle:@"six"];
[self assert:@"zero" same:[popUpButton title]];
[[popUpButton itemAtIndex:0] setTitle:@"new title"];
[self assert:@"new title" same:[popUpButton title]];
[popUpButton selectItemAtIndex:3];
[self assert:@"three" same:[popUpButton title]];
[[popUpButton itemAtIndex:3] setTitle:@"something else"];
[self assert:@"something else" same:[popUpButton title]];
[popUpButton selectItemAtIndex:6];
[self assert:@"six" same:[popUpButton title]];
[[popUpButton itemAtIndex:6] setTitle:@"another title"];
[self assert:@"another title" same:[popUpButton title]];
var popUpButton = [[CPPopUpButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 28.0) pullsDown:YES];
[popUpButton addItemWithTitle:@"zero"];
[popUpButton addItemWithTitle:@"one"];
[popUpButton addItemWithTitle:@"two"];
[popUpButton addItemWithTitle:@"three"];
[popUpButton addItemWithTitle:@"four"];
[popUpButton addItemWithTitle:@"five"];
[popUpButton addItemWithTitle:@"six"];
[self assert:@"zero" same:[popUpButton title]];
[[popUpButton itemAtIndex:0] setTitle:@"new title"];
[self assert:@"new title" same:[popUpButton title]];
[popUpButton selectItemAtIndex:3];
[self assert:@"new title" same:[popUpButton title]];
[[popUpButton itemAtIndex:3] setTitle:@"something else"];
[self assert:@"new title" same:[popUpButton title]];
[popUpButton selectItemAtIndex:6];
[self assert:@"new title" same:[popUpButton title]];
[[popUpButton itemAtIndex:6] setTitle:@"another title"];
[self assert:@"new title" same:[popUpButton title]];
}
- (void)testItemTitles
{
[self assert:[] equals:[button itemTitles]];
+5 -1
View File
@@ -5,7 +5,11 @@ var FILE = require("file"),
var cPreprocessedFileContents = function(aFilePath)
{
var gcc = OS.popen("gcc -E -x c -P -DPLATFORM_COMMONJS " + OS.enquote(aFilePath), { charset:"UTF-8" }),
var INCLUDES = new FileList(FILE.join(FILE.dirname(aFilePath), "**", "*.h")).map(function(aFilename)
{
return "--include \"" + aFilename + "\"";
}).join(" ");
var gcc = OS.popen("gcc -E -x c -P -DPLATFORM_COMMONJS " + INCLUDES + " " + OS.enquote(aFilePath), { charset:"UTF-8" }),
chunk,
fileContents = "";
@@ -2,12 +2,7 @@
@implementation MyDict : CPDictionary
{
int a;
}
+ (id)alloc
{
return class_createInstance(self);
CPString _firstName;
}
- (id)init
@@ -15,7 +10,7 @@
self = [super init];
if (self)
_a = "Bob";
_firstName = "Bob";
return self;
}
@@ -27,13 +22,13 @@
- (CPString)name
{
return _a;
return _firstName;
}
@end
@implementation TestSubclassableDictionary : OJTestCase
@implementation CPSubclassableDictionaryTest : OJTestCase
- (void)testThatMyDictContainsReplacedNameSelector
{
@@ -53,7 +48,7 @@
{
var target = [[CPDictionary alloc] init];
[OJAssert assert:@"Bob" notEqual:[target name]];
[OJAssert assert:NO same:[target respondsToSelector:@selector(name)]];
}
- (void)testThatTollFreeDoesNotHaveNewSelector
@@ -63,4 +58,4 @@
[OJAssert assertThrows:function() { [target secondaryName]; }];
}
@end
@end
@@ -0,0 +1,56 @@
/*
* AppController.j
* TableBindings
*
* Created by You on January 16, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
CPArrayController arrayController;
CPTextField from;
CPTextField to;
CPArray rows @accessors;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (void)awakeFromCib
{
rows = [CPArray new];
var path = [[CPBundle mainBundle] pathForResource:@"rows.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 setRows:theRows];
}
- (void)test:(id)sender
{
var range = CPMakeRange([from intValue], [to intValue]);
var indexes = [CPIndexSet indexSetWithIndexesInRange:range];
[[rows objectsAtIndexes:indexes] setValue:@"b" forKey:@"colTwo"];
}
@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>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>TableBindings</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
</dict>
</plist>
@@ -0,0 +1,94 @@
/*
* Jakefile
* TableBindings
*
* Created by You on January 16, 2011.
* Copyright 2011, 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 ("TableBindings", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "TableBindings.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("TableBindings");
task.setIdentifier("com.yourcompany.TableBindings");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("TableBindings");
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", ["TableBindings"], 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", "TableBindings", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "TableBindings", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "TableBindings"));
OS.system(["press", "-f", FILE.join("Build", "Release", "TableBindings"), FILE.join("Build", "Deployment", "TableBindings")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "TableBindings"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "TableBindings"), FILE.join("Build", "Desktop", "TableBindings", "TableBindings.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "TableBindings", "TableBindings.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "TableBindings"));
print("----------------------------");
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
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
TableBindings
Created by You on January 16, 2011.
Copyright 2011, 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>TableBindings</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 TableBindings...</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
TableBindings
Created by You on January 16, 2011.
Copyright 2011, 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>TableBindings</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 TableBindings...</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
* TableBindings
*
* Created by You on January 16, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
+1
View File
@@ -37,6 +37,7 @@
_preservesSelection = [aCoder decodeBoolForKey:@"NSPreservesSelection"];
_selectsInsertedObjects = [aCoder decodeBoolForKey:@"NSSelectsInsertedObjects"];
_alwaysUsesMultipleValuesMarker = [aCoder decodeBoolForKey:@"NSAlwaysUsesMultipleValuesMarker"];
_automaticallyRearrangesObjects = [aCoder decodeBoolForKey:@"NSAutomaticallyRearrangesObjects"];
}
return self;
+18 -11
View File
@@ -79,6 +79,24 @@ function check_and_exit () {
}
function check_build_environment () {
# make sure dependencies are installed and on the $PATH
CAPP_BUILD_DEPS=(java gcc unzip)
for dep in ${CAPP_BUILD_DEPS[@]}; do
which "$dep" &> /dev/null
if [ ! "$?" = "0" ]; then
echo "Error: $dep is required to bootstrap Cappuccino. Please install $dep and re-run bootstrap.sh."
exit 1
fi
done
# special case: check for curl or wget
which curl &> /dev/null || which wget &> /dev/null
if [ ! "$?" = "0" ]; then
echo "Error: curl or wget are required to bootstrap Cappuccino. Please install one of them and re-run bootstrap.sh."
exit 1
fi
# make sure user is running the Sun JVM or OpenJDK >= 6b18
java_version=$(java -version 2>&1)
echo $java_version | grep OpenJDK > /dev/null
@@ -90,17 +108,6 @@ function check_build_environment () {
exit 1
fi
fi
# make sure other dependencies are installed and on the $PATH
OTHER_DEPS=(gcc unzip)
for dep in ${OTHER_DEPS[@]}; do
which "$dep" &> /dev/null
if [ ! "$?" = "0" ]; then
echo "Error: $dep is required to build Cappuccino. Please install $dep and re-run bootstrap.sh."
exit 1
fi
done
}
check_build_environment