Merge branch 'popup_button_binder_subclass' of https://github.com/cacaodev/cappuccino into binding_support_popup_button

Conflicts:
	AppKit/CPPopUpButton.j
This commit is contained in:
Martin Carlberg committed 2012-06-30 08:41:14 +02:00
commit 70b5f9ee98
53 files changed
+3618 -290

No files matched your search

+175 -27
View File
@@ -111,6 +111,8 @@ CPButtonImageOffset = 3.0;
CPTimer _continuousTimer;
float _periodicDelay;
float _periodicInterval;
BOOL _isTracking;
}
+ (id)buttonWithTitle:(CPString)aTitle
@@ -177,7 +179,7 @@ CPButtonImageOffset = 3.0;
_periodicInterval = 0.05;
_periodicDelay = 0.5;
_imageDimsWhenDisabled = YES;
[self setButtonType:CPMomentaryPushInButton];
}
// Setting the state
@@ -215,17 +217,13 @@ CPButtonImageOffset = 3.0;
{
if (!anObjectValue || anObjectValue === @"" || ([anObjectValue intValue] === 0))
anObjectValue = CPOffState;
else if (![anObjectValue isKindOfClass:[CPNumber class]])
anObjectValue = CPOnState;
else if (anObjectValue >= CPOnState)
anObjectValue = CPOnState
else if (anObjectValue < CPOffState)
if ([self allowsMixedState])
anObjectValue = CPMixedState;
else
anObjectValue = CPOnState;
@@ -233,15 +231,26 @@ CPButtonImageOffset = 3.0;
switch ([self objectValue])
{
case CPMixedState: [self unsetThemeState:CPThemeStateSelected];
[self setThemeState:CPButtonStateMixed];
break;
case CPMixedState:
[self unsetThemeState:CPThemeStateSelected];
[self setThemeState:CPButtonStateMixed];
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
[self setThemeState:CPThemeStateHighlighted];
else
[self unsetThemeState:CPThemeStateHighlighted];
break;
case CPOnState: [self unsetThemeState:CPButtonStateMixed];
[self setThemeState:CPThemeStateSelected];
break;
case CPOnState:
[self unsetThemeState:CPButtonStateMixed];
[self setThemeState:CPThemeStateSelected];
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
[self setThemeState:CPThemeStateHighlighted];
else
[self unsetThemeState:CPThemeStateHighlighted];
break;
case CPOffState: [self unsetThemeState:CPThemeStateSelected | CPButtonStateMixed];
case CPOffState:
[self unsetThemeState:CPThemeStateSelected | CPButtonStateMixed | CPThemeStateHighlighted];
}
}
@@ -376,11 +385,19 @@ CPButtonImageOffset = 3.0;
- (void)setShowsStateBy:(CPInteger)aMask
{
// CPPushInCellMask cannot be set for showsStateBy.
aMask &= ~CPPushInCellMask;
if (_showsStateBy === aMask)
return;
_showsStateBy = aMask;
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask) && [self state] != CPOffState)
[self setThemeState:CPThemeStateHighlighted];
else
[self unsetThemeState:CPThemeStateHighlighted];
[self setNeedsDisplay:YES];
[self setNeedsLayout];
}
@@ -404,15 +421,20 @@ CPButtonImageOffset = 3.0;
}
}
- (CPInteger)highlightsBy
{
return _highlightsBy;
}
- (void)setButtonType:(CPButtonType)aButtonType
{
switch (aButtonType)
{
case CPMomentaryLightButton: [self setHighlightsBy:CPChangeBackgroundCellMask];
case CPMomentaryLightButton: [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask];
[self setShowsStateBy:CPNoCellMask];
break;
case CPMomentaryPushInButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask];
case CPMomentaryPushInButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask];
[self setShowsStateBy:CPNoCellMask];
break;
@@ -420,12 +442,12 @@ CPButtonImageOffset = 3.0;
[self setShowsStateBy:CPNoCellMask];
break;
case CPPushOnPushOffButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask];
[self setShowsStateBy:CPChangeBackgroundCellMask];
case CPPushOnPushOffButton: [self setHighlightsBy:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask];
[self setShowsStateBy:CPChangeBackgroundCellMask | CPChangeGrayCellMask];
break;
case CPOnOffButton: [self setHighlightsBy:CPChangeBackgroundCellMask];
[self setShowsStateBy:CPChangeBackgroundCellMask];
case CPOnOffButton: [self setHighlightsBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask];
[self setShowsStateBy:CPChangeGrayCellMask | CPChangeBackgroundCellMask];
break;
case CPToggleButton: [self setHighlightsBy:CPPushInCellMask | CPContentsCellMask];
@@ -496,20 +518,43 @@ CPButtonImageOffset = 3.0;
- (BOOL)startTrackingAt:(CGPoint)aPoint
{
[self highlight:YES];
_isTracking = YES;
return [super startTrackingAt:aPoint];
var startedTracking = [super startTrackingAt:aPoint];
if (_highlightsBy & (CPPushInCellMask | CPChangeGrayCellMask))
{
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
[self highlight:[self state] == CPOffState];
else
[self highlight:YES];
}
else
{
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
[self highlight:[self state] != CPOffState];
else
[self highlight:NO];
}
return startedTracking;
}
- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp
{
[self highlight:NO];
[self invalidateTimers];
[super stopTracking:lastPoint at:aPoint mouseIsUp:mouseIsUp];
_isTracking = NO;
if (mouseIsUp && CGRectContainsPoint([self bounds], aPoint))
[self setNextState];
else
{
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
[self highlight:[self state] != CPOffState];
else
[self highlight:NO];
}
[self setNeedsLayout];
[self setNeedsDisplay:YES];
[self invalidateTimers];
}
- (void)invalidateTimers
@@ -643,8 +688,51 @@ CPButtonImageOffset = 3.0;
if (contentView)
{
[contentView setText:([self hasThemeState:CPThemeStateHighlighted] && _alternateTitle) ? _alternateTitle : _title];
[contentView setImage:[self currentValueForThemeAttribute:@"image"]];
var title = nil,
image = nil;
if (_isTracking)
{
if (_highlightsBy & CPContentsCellMask)
{
if (_showsStateBy & CPContentsCellMask)
{
title = ([self state] == CPOffState && _alternateTitle) ? _alternateTitle : _title;
image = ([self state] == CPOffState && [self alternateImage]) ? [self alternateImage] : [self image];
}
else
{
title = [self alternateTitle];
image = [self alternateImage];
}
}
else if (_showsStateBy & CPContentsCellMask)
{
title = ([self state] != CPOffState && _alternateTitle) ? _alternateTitle : _title;
image = ([self state] != CPOffState && [self alternateImage]) ? [self alternateImage] : [self image];
}
else
{
title = _title;
image = [self image];
}
}
else
{
if (_showsStateBy & CPContentsCellMask)
{
title = ([self state] != CPOffState && _alternateTitle) ? _alternateTitle : _title;
image = ([self state] != CPOffState && [self alternateImage]) ? [self alternateImage] : [self image];
}
else
{
title = _title;
image = [self image];
}
}
[contentView setText:title];
[contentView setImage:image];
[contentView setImageOffset:[self currentValueForThemeAttribute:@"image-offset"]];
[contentView setFont:[self currentValueForThemeAttribute:@"font"]];
@@ -743,9 +831,51 @@ CPButtonImageOffset = 3.0;
return NO;
[self performClick:nil];
return YES;
}
/*!
Perform a click on the receiver.
@param sender - The sender object
*/
- (void)performClick:(id)sender
{
// This is slightly different from [super performClick:] in that the highlight behaviour is dependent on
// highlightsBy and showsStateBy.
if (![self isEnabled])
return;
[self setState:[self nextState]];
var shouldHighlight = NO;
if (_highlightsBy & (CPPushInCellMask | CPChangeGrayCellMask))
{
if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
shouldHighlight = [self state] == CPOffState;
else
shouldHighlight = YES;
}
[self highlight:shouldHighlight];
try
{
[self sendAction:[self action] to:[self target]];
}
catch (e)
{
throw e;
}
finally
{
if (shouldHighlight)
[CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unhighlightButtonTimerDidFinish:) userInfo:nil repeats:NO];
}
}
@end
@implementation CPButton (NS)
@@ -786,7 +916,9 @@ var CPButtonImageKey = @"CPButtonImageKey",
CPButtonKeyEquivalentKey = @"CPButtonKeyEquivalentKey",
CPButtonKeyEquivalentMaskKey = @"CPButtonKeyEquivalentMaskKey",
CPButtonPeriodicDelayKey = @"CPButtonPeriodicDelayKey",
CPButtonPeriodicIntervalKey = @"CPButtonPeriodicIntervalKey";
CPButtonPeriodicIntervalKey = @"CPButtonPeriodicIntervalKey",
CPButtonHighlightsByKey = @"CPButtonHighlightsByKey",
CPButtonShowsStateByKey = @"CPButtonShowsStateByKey";
@implementation CPButton (CPCoding)
@@ -806,6 +938,19 @@ var CPButtonImageKey = @"CPButtonImageKey",
_alternateTitle = [aCoder decodeObjectForKey:CPButtonAlternateTitleKey];
_allowsMixedState = [aCoder decodeBoolForKey:CPButtonAllowsMixedStateKey];
if ([aCoder containsValueForKey:CPButtonHighlightsByKey])
{
// If one exists, assume both do.
_highlightsBy = [aCoder decodeIntForKey:CPButtonHighlightsByKey];
_showsStateBy = [aCoder decodeIntForKey:CPButtonShowsStateByKey];
}
else
{
// Backwards compatibility: if this CPButton was encoded before coding of
// highlightsBy and showsStateBy were added, we should just use the
// default values from _init rather than overwriting with 0, 0.
}
[self setImageDimsWhenDisabled:[aCoder decodeObjectForKey:CPButtonImageDimsWhenDisabledKey]];
if ([aCoder containsValueForKey:CPButtonImagePositionKey])
@@ -843,6 +988,9 @@ var CPButtonImageKey = @"CPButtonImageKey",
[aCoder encodeBool:_allowsMixedState forKey:CPButtonAllowsMixedStateKey];
[aCoder encodeInt:_highlightsBy forKey:CPButtonHighlightsByKey];
[aCoder encodeInt:_showsStateBy forKey:CPButtonShowsStateByKey];
[aCoder encodeBool:[self imageDimsWhenDisabled] forKey:CPButtonImageDimsWhenDisabledKey];
[aCoder encodeInt:[self imagePosition] forKey:CPButtonImagePositionKey];
+17
View File
@@ -94,6 +94,23 @@ CPCheckBoxImageOffset = 4.0;
[self takeStateFromKeyPath:aKeyPath ofObjects:objects];
}
- (CPImage)image
{
return [self currentValueForThemeAttribute:@"image"];
}
- (CPImage)alternateImage
{
return [self currentValueForThemeAttribute:@"image"];
}
- (BOOL)startTrackingAt:(CGPoint)aPoint
{
var startedTracking = [super startTrackingAt:aPoint];
[self highlight:YES];
return startedTracking;
}
@end
@implementation _CPCheckBoxValueBinder : CPBinder
+17 -14
View File
@@ -134,18 +134,18 @@ var CPControlBlackColor = [CPColor blackColor];
+ (void)initialize
{
if (self === [CPControl class])
{
[self exposeBinding:@"value"];
[self exposeBinding:@"objectValue"];
[self exposeBinding:@"stringValue"];
[self exposeBinding:@"integerValue"];
[self exposeBinding:@"intValue"];
[self exposeBinding:@"doubleValue"];
[self exposeBinding:@"floatValue"];
if (self !== [CPControl class])
return;
[self exposeBinding:@"enabled"];
}
[self exposeBinding:@"value"];
[self exposeBinding:@"objectValue"];
[self exposeBinding:@"stringValue"];
[self exposeBinding:@"integerValue"];
[self exposeBinding:@"intValue"];
[self exposeBinding:@"doubleValue"];
[self exposeBinding:@"floatValue"];
[self exposeBinding:@"enabled"];
}
+ (Class)_binderClassForBinding:(CPString)theBinding
@@ -391,7 +391,10 @@ var CPControlBlackColor = [CPColor blackColor];
- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp
{
[self highlight:NO];
if (mouseIsUp)
[self highlight:NO];
else
[self highlight:YES];
}
- (void)mouseDown:(CPEvent)anEvent
@@ -872,9 +875,9 @@ var CPControlValueKey = "CPControlValueKey",
CPControlActionKey = "CPControlActionKey",
CPControlSendActionOnKey = "CPControlSendActionOnKey",
CPControlSendsActionOnEndEditingKey = "CPControlSendsActionOnEndEditingKey";
CPControlSendsActionOnEndEditingKey = "CPControlSendsActionOnEndEditingKey",
var __Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
__Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
@implementation CPControl (CPCoding)
+4 -1
View File
@@ -67,7 +67,7 @@ var _CPFonts = {},
@code
<key>CPSystemFontFace</key>
<string>Lucida Grande</string>
@endcode
@endcode
*/
@implementation CPFont : CPObject
{
@@ -84,6 +84,9 @@ var _CPFonts = {},
+ (void)initialize
{
if (self !== [CPFont class])
return;
var systemFontFace = [[CPBundle mainBundle] objectForInfoDictionaryKey:@"CPSystemFontFace"];
if (!systemFontFace)
+3
View File
@@ -59,6 +59,9 @@ var CPImageViewEmptyPlaceholderImage = nil;
+ (void)initialize
{
if (self !== [CPImageView class])
return;
var bundle = [CPBundle bundleForClass:[CPView class]];
CPImageViewEmptyPlaceholderImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"empty.png"]];
+1 -1
View File
@@ -153,7 +153,7 @@ var CPKeyBindingCache = {};
+ (void)initialize
{
if ([self class] !== CPKeyBinding)
if (self !== [CPKeyBinding class])
return;
[self createKeyBindingsFromJSObject:CPStandardKeyBindings];
+6 -1
View File
@@ -190,7 +190,7 @@ var CPBindingOperationAnd = 0,
var destination = [_info objectForKey:CPObservedObjectKey],
keyPath = [_info objectForKey:CPObservedKeyPathKey],
options = [_info objectForKey:CPOptionsKey],
newValue = [_source valueForKeyPath:aBinding];
newValue = [self valueForBinding:aBinding];
newValue = [self reverseTransformValue:newValue withOptions:options];
@@ -199,6 +199,11 @@ var CPBindingOperationAnd = 0,
[self unsuppressSpecificNotificationFromObject:destination keyPath:keyPath];
}
- (id)valueForBinding:(CPString)aBinding
{
return [_source valueForKeyPath:aBinding];
}
- (void)observeValueForKeyPath:(CPString)aKeyPath ofObject:(id)anObject change:(CPDictionary)changes context:(id)context
{
if (!changes)
+3
View File
@@ -64,6 +64,9 @@ var _CPLevelIndicatorBezelColor = nil,
+ (void)initialize
{
if (self !== [CPLevelIndicator class])
return;
var bundle = [CPBundle bundleForClass:CPLevelIndicator];
_CPLevelIndicatorBezelColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
+1 -1
View File
@@ -80,7 +80,7 @@ var _CPMenuBarVisible = NO,
+ (void)initialize
{
if (self !== CPMenu)
if (self !== [CPMenu class])
return;
[[self class] setMenuBarAttributes:[CPDictionary dictionary]];
+1 -1
View File
@@ -34,7 +34,7 @@ var _CPMenuBarWindowBackgroundColor = nil,
+ (void)initialize
{
if (self != [_CPMenuBarWindow class])
if (self !== [_CPMenuBarWindow class])
return;
var bundle = [CPBundle bundleForClass:self];
+1 -1
View File
@@ -65,7 +65,7 @@ var STICKY_TIME_INTERVAL = 500,
+ (void)initialize
{
if (self != [_CPMenuWindow class])
if (self !== [_CPMenuWindow class])
return;
var bundle = [CPBundle bundleForClass:self];
+1 -1
View File
@@ -40,7 +40,7 @@ var _CPMenuItemSelectionColor = nil,
+ (void)initialize
{
if (self != [_CPMenuItemView class])
if (self !== [_CPMenuItemView class])
return;
_CPMenuItemSelectionColor = [CPColor colorWithCalibratedRed:95.0 / 255.0 green:131.0 / 255.0 blue:185.0 / 255.0 alpha:1.0];
+3
View File
@@ -51,6 +51,9 @@
+ (id)initialize
{
if (self !== [CPObjectController class])
return;
[self exposeBinding:@"editable"];
[self exposeBinding:@"contentObject"];
}
+1 -1
View File
@@ -73,7 +73,7 @@ var CPPasteboards = nil,
*/
+ (void)initialize
{
if (self != [CPPasteboard class])
if (self !== [CPPasteboard class])
return;
[self setVersion:1.0];
+79 -69
View File
@@ -22,11 +22,11 @@
@import "CPButton.j"
@import "CPGeometry.j"
@import "CPKeyValueBinding.j"
@import "CPMenu.j"
@import "CPMenuItem.j"
@import <AppKit/CPKeyValueBinding.j>
var VISIBLE_MARGIN = 7.0;
CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
@@ -768,10 +768,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
- (void)_reverseSetBinding
{
var binderClass = [[self class] _binderClassForBinding:CPSelectedIndexBinding],
theBinding = [binderClass getBinding:CPSelectedIndexBinding forObject:self];
[theBinding reverseSetValueFor:@"objectValue"];
[_CPPopUpButtonSelectionBinder reverseSetValueForObject:self];
[super _reverseSetBinding];
}
@@ -779,73 +776,24 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
@end
@implementation CPPopUpButton (BindingSupport)
/*
- (void)_setItemValues:(CPArray)values forKey:(CPString)key
+ (Class)_binderClassForBinding:(CPString)aBinding
{
var i,
count = [values count];
if (count != [self numberOfItems])
{
[self removeAllItems];
var count2 = count;
while (count2--)
[self addItemWithTitle:@""];
}
if (!key)
return;
while (count--)
[[self itemAtIndex:count] setValue:[values objectAtIndex:count] forKey:key];
}
*/
- (CPUInteger)selectedIndex
{
return [self indexOfSelectedItem];
if (aBinding == CPSelectedIndexBinding ||
aBinding == CPSelectedObjectBinding ||
aBinding == CPSelectedTagBinding ||
aBinding == CPSelectedValueBinding)
return [_CPPopUpButtonSelectionBinder class];
return [super _binderClassForBinding:aBinding];
}
- (void)setSelectedIndex:(CPUInteger)aValue
{
[self selectItemAtIndex:aValue];
}
- (CPString)selectedValue
{
return [self titleOfSelectedItem];
}
- (void)setSelectedValue:(CPString)aValue
{
[self selectItemWithTitle:aValue];
}
- (id)selectedObject
{
return [[self selectedItem] representedObject];
}
- (void)setSelectedObject:(id)aValue
{
[self selectItemAtIndex:[self indexOfItemWithRepresentedObject:aValue]];
}
- (CPInteger)selectedTag
{
return [[self selectedItem] tag];
}
- (void)setSelectedTag:(CPInteger)aValue
{
[self selectItemWithTag:aValue];
}
- (CPArray)contentValues
- (CPArray)_contentValues
{
return [self valueForKeyPath:@"itemArray.title"];
}
- (void)setContentValues:(CPArray)aValue
- (void)_setContentValues:(CPArray)aValue
{
var count = [aValue count];
@@ -863,12 +811,12 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
[self synchronizeTitleAndSelectedItem];
}
- (CPArray)content
- (CPArray)_content
{
return [self valueForKeyPath:@"itemArray.representedObject"];
}
- (void)setContent:(CPArray)aValue
- (void)_setContent:(CPArray)aValue
{
var count = [aValue count];
@@ -890,14 +838,76 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
if (![self infoForBinding:CPContentValuesBinding])
{
var descriptions = [aValue valueForKey:@"description"];
for (var i = 0; i < count; i++)
[[self itemAtIndex:i] setTitle:[descriptions objectAtIndex:i]];
[[self itemAtIndex:i] setTitle:[[aValue objectAtIndex:i] description]];
}
}
@end
var binderForObject = {},
selectionBindings = [CPSelectedIndexBinding, CPSelectedObjectBinding, CPSelectedTagBinding, CPSelectedValueBinding];
@implementation _CPPopUpButtonSelectionBinder : CPBinder
{
CPString _selectionBinding @accessors(property=binding);
}
+ (void)reverseSetValueForObject:(id)aSource
{
var uid = [aSource UID],
binder = binderForObject[uid];
if (binder == nil)
{
var count = selectionBindings.length;
while (count--)
{
var binding = selectionBindings[count];
binder = [self getBinding:binding forObject:aSource];
if (binder != nil)
{
binderForObject[uid] = binder;
[binder setBinding:binding];
break;
}
}
}
[binder reverseSetValueFor:[binder binding]];
}
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
{
if (aBinding == CPSelectedIndexBinding)
[_source selectItemAtIndex:aValue];
else if (aBinding == CPSelectedObjectBinding)
[_source selectItemAtIndex:[_source indexOfItemWithRepresentedObject:aValue]];
else if (aBinding == CPSelectedTagBinding)
[_source selectItemWithTag:aValue];
else if (aBinding == CPSelectedValueBinding)
[_source selectItemWithTitle:aValue];
}
- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding
{
[self setValue:aValue forBinding:aBinding];
}
- (id)valueForBinding:(CPString)aBinding
{
if (aBinding == CPSelectedIndexBinding)
return [_source indexOfSelectedItem];
else if (aBinding == CPSelectedObjectBinding)
return [[_source selectedItem] representedObject];
else if (aBinding == CPSelectedTagBinding)
return [[_source selectedItem] tag];
else if (aBinding == CPSelectedValueBinding)
return [_source titleOfSelectedItem];
}
@end
var DEPRECATED_CPPopUpButtonMenuKey = @"CPPopUpButtonMenuKey",
DEPRECATED_CPPopUpButtonSelectedIndexKey = @"CPPopUpButtonSelectedIndexKey";
+6 -6
View File
@@ -78,7 +78,7 @@ var CPProgressIndicatorSpinningStyleColors = nil,
*/
+ (void)initialize
{
if (self != [CPProgressIndicator class])
if (self !== [CPProgressIndicator class])
return;
var bundle = [CPBundle bundleForClass:self];
@@ -120,11 +120,11 @@ var CPProgressIndicatorSpinningStyleColors = nil,
// Bar Style
var prefixes = [
CPProgressIndicatorClassName + @"BezelBorder" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorBarStyle],
CPProgressIndicatorClassName + @"Bar" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorBarStyle],
CPProgressIndicatorClassName + @"BezelBorder" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorHUDBarStyle],
CPProgressIndicatorClassName + @"Bar" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorHUDBarStyle]
];
CPProgressIndicatorClassName + @"BezelBorder" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorBarStyle],
CPProgressIndicatorClassName + @"Bar" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorBarStyle],
CPProgressIndicatorClassName + @"BezelBorder" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorHUDBarStyle],
CPProgressIndicatorClassName + @"Bar" + CPProgressIndicatorStyleIdentifiers[CPProgressIndicatorHUDBarStyle]
];
for (var i = 0, count = prefixes.length; i < count; i++)
{
+17
View File
@@ -181,6 +181,23 @@ var CPRadioRadioGroupKey = @"CPRadioRadioGroupKey";
[aCoder encodeObject:_radioGroup forKey:CPRadioRadioGroupKey];
}
- (CPImage)image
{
return [self currentValueForThemeAttribute:@"image"];
}
- (CPImage)alternateImage
{
return [self currentValueForThemeAttribute:@"image"];
}
- (BOOL)startTrackingAt:(CGPoint)aPoint
{
var startedTracking = [super startTrackingAt:aPoint];
[self highlight:YES];
return startedTracking;
}
@end
@implementation CPRadioGroup : CPObject
+3
View File
@@ -125,6 +125,9 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
+ (void)initialize
{
if (self !== [CPScrollView class])
return;
var globalValue = [[CPBundle mainBundle] objectForInfoDictionaryKey:@"CPScrollersGlobalStyle"];
if (globalValue == nil || globalValue == -1)
+1 -1
View File
@@ -72,7 +72,7 @@ var RECENT_SEARCH_PREFIX = @" ";
+ (void)initialize
{
if (self != [CPSearchField class])
if (self !== [CPSearchField class])
return;
var bundle = [CPBundle bundleForClass:self];
+1 -1
View File
@@ -54,7 +54,7 @@ var LIGHT_LEFT_INSET = 3.0,
+ (void)initialize
{
if (self != [CPShadowView class])
if (self !== [CPShadowView class])
return;
var bundle = [CPBundle bundleForClass:[self class]];
+1 -1
View File
@@ -113,7 +113,7 @@ var CPSplitViewHorizontalImage = nil,
*/
+ (void)initialize
{
if (self != [CPSplitView class])
if (self !== [CPSplitView class])
return;
var bundle = [CPBundle bundleForClass:self];
+27 -4
View File
@@ -114,7 +114,7 @@ var CPToolbarsByIdentifier = nil,
/* @ignore */
+ (void)initialize
{
if (self != [CPToolbar class])
if (self !== [CPToolbar class])
return;
CPToolbarsByIdentifier = [CPDictionary dictionary];
@@ -241,7 +241,13 @@ var CPToolbarsByIdentifier = nil,
- (void)_setWindow:(CPWindow)aWindow
{
if (_window)
[[CPNotificationCenter defaultCenter] removeObserver:self object:_window];
_window = aWindow;
if (_window)
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_autovalidate) name:_CPWindowDidChangeFirstResponderNotification object:aWindow];
}
/*!
@@ -314,13 +320,17 @@ var CPToolbarsByIdentifier = nil,
// _defaultItems may have been loaded from Cib
_itemIdentifiers = [_defaultItems valueForKey:@"itemIdentifier"] || [];
if (_delegate)
if ([_delegate respondsToSelector:@selector(toolbarDefaultItemIdentifiers:)])
{
var itemIdentifiersFromDelegate = [[_delegate toolbarDefaultItemIdentifiers:self] mutableCopy];
var itemIdentifiersFromDelegate = [_delegate toolbarDefaultItemIdentifiers:self];
// If we get items both from the Cib and from the delegate method, put the delegate items before the
// Cib ones.
if (itemIdentifiersFromDelegate)
_itemIdentifiers = [_itemIdentifiers arrayByAddingObjectsFromArray:itemIdentifiersFromDelegate];
_itemIdentifiers = [itemIdentifiersFromDelegate arrayByAddingObjectsFromArray:_itemIdentifiers];
}
// If we didn't load from a cib and the delegate hasn't been set yet, we'll just work with an empty list
// at this point.
var index = 0,
count = [_itemIdentifiers count];
@@ -397,6 +407,19 @@ var CPToolbarsByIdentifier = nil,
[toolbarItems[count] validate];
}
- (void)_autovalidate
{
var toolbarItems = [self visibleItems],
count = [toolbarItems count];
while (count--)
{
var item = [toolbarItems objectAtIndex:count];
if ([item autovalidates])
[item validate];
}
}
/* @ignore */
- (id)_itemForItemIdentifier:(CPString)identifier willBeInsertedIntoToolbar:(BOOL)toolbar
{
+1 -1
View File
@@ -893,7 +893,7 @@ var CPCurrentToolTip,
}
/*!
Returns the center of the receiver's frame to the provided point. The point is defined in the superview's coordinate system.
Returns the center of the receiver's frame in the superview's coordinate system.
@return CGPoint the center point of the receiver's frame
*/
- (CGPoint)center
+4 -2
View File
@@ -78,8 +78,10 @@ var CPViewControllerCachedCibs;
+ (void)initialize
{
if (self === CPViewController)
CPViewControllerCachedCibs = [CPDictionary dictionary];
if (self !== [CPViewController class])
return;
CPViewControllerCachedCibs = [CPDictionary dictionary];
}
/*!
+39 -26
View File
@@ -167,18 +167,20 @@ CPWindowAbove = 1;
*/
CPWindowBelow = 2;
CPWindowWillCloseNotification = @"CPWindowWillCloseNotification";
CPWindowDidBecomeMainNotification = @"CPWindowDidBecomeMainNotification";
CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification";
CPWindowDidBecomeKeyNotification = @"CPWindowDidBecomeKeyNotification";
CPWindowDidResignKeyNotification = @"CPWindowDidResignKeyNotification";
CPWindowDidResizeNotification = @"CPWindowDidResizeNotification";
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification";
CPWindowWillBeginSheetNotification = @"CPWindowWillBeginSheetNotification";
CPWindowDidEndSheetNotification = @"CPWindowDidEndSheetNotification";
CPWindowDidMiniaturizeNotification = @"CPWindowDidMiniaturizeNotification";
CPWindowWillMiniaturizeNotification = @"CPWindowWillMiniaturizeNotification";
CPWindowDidDeminiaturizeNotification = @"CPWindowDidDeminiaturizeNotification";
CPWindowWillCloseNotification = @"CPWindowWillCloseNotification";
CPWindowDidBecomeMainNotification = @"CPWindowDidBecomeMainNotification";
CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification";
CPWindowDidBecomeKeyNotification = @"CPWindowDidBecomeKeyNotification";
CPWindowDidResignKeyNotification = @"CPWindowDidResignKeyNotification";
CPWindowDidResizeNotification = @"CPWindowDidResizeNotification";
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification";
CPWindowWillBeginSheetNotification = @"CPWindowWillBeginSheetNotification";
CPWindowDidEndSheetNotification = @"CPWindowDidEndSheetNotification";
CPWindowDidMiniaturizeNotification = @"CPWindowDidMiniaturizeNotification";
CPWindowWillMiniaturizeNotification = @"CPWindowWillMiniaturizeNotification";
CPWindowDidDeminiaturizeNotification = @"CPWindowDidDeminiaturizeNotification";
_CPWindowDidChangeFirstResponderNotification = @"_CPWindowDidChangeFirstResponderNotification";
CPWindowShadowStyleStandard = 0;
CPWindowShadowStyleMenu = 1;
@@ -343,7 +345,7 @@ var CPWindowActionMessageKeys = [
*/
+ (void)initialize
{
if (self != [CPWindow class])
if (self !== [CPWindow class])
return;
var bundle = [CPBundle bundleForClass:[CPWindow class]];
@@ -822,7 +824,7 @@ CPTexturedBackgroundWindowMask
#endif
if (_firstResponder === self || !_firstResponder)
[self makeFirstResponder:[self initialFirstResponder]];
[self makeFirstResponder:_initialFirstResponder];
if (!CPApp._keyWindow)
[self makeKeyWindow];
@@ -962,7 +964,7 @@ CPTexturedBackgroundWindowMask
// During init the initial first responder is set to the contentView
// if it hasn't changed in the mean time we need to update that reference
// to the new contentView
if ([self initialFirstResponder] === _contentView)
if (_initialFirstResponder === _contentView)
[self setInitialFirstResponder:aView];
_contentView = aView;
@@ -1299,21 +1301,24 @@ CPTexturedBackgroundWindowMask
- (void)setInitialFirstResponder:(CPView)aView
{
// Before an initial first responder is set, be sure to calculate the key loop
[self _setupFirstResponder:aView];
_initialFirstResponder = aView;
}
- (void)_setupFirstResponder
- (void)_setupFirstResponder:(CPView)anInitialFirstResponder
{
/*
If:
- The key loop is dirty
- The key loop does not auto-recalculate
- The first responder is the window
- The initial first responder is the content view
- No view within the window has become first responder
- No initial first responder has been set
Then calculate the key view loop and set the first responder
to the first view in the loop, since we should
to the first view in the loop if no initial responder has been set, since we should
always have an initial first responder and a key loop by default.
*/
if (_keyViewLoopIsDirty &&
@@ -1323,10 +1328,15 @@ CPTexturedBackgroundWindowMask
{
[self recalculateKeyViewLoop];
// Make the first key view of the content view the first responder
var firstKeyView = [[self contentView] nextValidKeyView];
if (anInitialFirstResponder)
[self makeFirstResponder:anInitialFirstResponder];
else
{
// Make the first key view of the content view the first responder
var firstKeyView = [[self contentView] nextValidKeyView];
[self makeFirstResponder:firstKeyView];
[self makeFirstResponder:firstKeyView];
}
}
}
@@ -1354,6 +1364,8 @@ CPTexturedBackgroundWindowMask
_firstResponder = aResponder;
[[CPNotificationCenter defaultCenter] postNotificationName:_CPWindowDidChangeFirstResponderNotification object:self];
return YES;
}
@@ -1684,7 +1696,7 @@ CPTexturedBackgroundWindowMask
if (_firstResponder !== self && [_firstResponder respondsToSelector:@selector(becomeKeyWindow)])
[_firstResponder becomeKeyWindow];
[self _setupFirstResponder];
[self _setupFirstResponder:nil];
[[CPNotificationCenter defaultCenter]
postNotificationName:CPWindowDidBecomeKeyNotification
@@ -2554,7 +2566,7 @@ CPTexturedBackgroundWindowMask
if (!nextValidKeyView)
{
var initialFirstResponder = [self initialFirstResponder];
var initialFirstResponder = _initialFirstResponder;
if ([initialFirstResponder acceptsFirstResponder])
nextValidKeyView = initialFirstResponder;
@@ -2577,7 +2589,7 @@ CPTexturedBackgroundWindowMask
if (!previousValidKeyView)
{
var initialFirstResponder = [self initialFirstResponder];
var initialFirstResponder = _initialFirstResponder;
if ([initialFirstResponder acceptsFirstResponder])
previousValidKeyView = initialFirstResponder;
@@ -2699,7 +2711,8 @@ var allViews = function(aWindow)
[views addObjectsFromArray:[[aWindow contentView] subviews]];
for (var index = 0; index < views.length; ++index)
// Start from index 1 because index 0 is the contentView and its subviews have already been added
for (var index = 1; index < views.length; ++index)
views = views.concat([views[index] subviews]);
return views;
+1 -1
View File
@@ -38,7 +38,7 @@ var HUD_TITLEBAR_HEIGHT = 26.0;
+ (void)initialize
{
if (self != [_CPHUDWindowView class])
if (self !== [_CPHUDWindowView class])
return;
var bundle = [CPBundle bundleForClass:self];
+1 -1
View File
@@ -45,7 +45,7 @@ var _CPWindowViewResizeIndicatorImage = nil;
+ (void)initialize
{
if (self != [_CPWindowView class])
if (self !== [_CPWindowView class])
return;
_CPWindowViewResizeIndicatorImage = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPWindow class]] pathForResource:@"_CPWindowView/_CPWindowViewResizeIndicator.png"] size:CGSizeMake(12.0, 12.0)];
+10 -16
View File
@@ -345,11 +345,10 @@ var concat = Array.prototype.concat,
/*!
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
@param predicate The function to apply to elements of the array. The function receives two arguments:
object The element in the array.
index The index of the element in the array.
@param predicate The function to apply to objects of the array. The function should have the signature:
@code function(object, index) @endcode
The predicate function should either return a Boolean value that indicates whether the object passed the test,
or nil to stop the search, which will return CPNotFound to the sender.
or nil to stop the search, which will return \c CPNotFound to the sender.
@return The index of the first matching object, or \c CPNotFound if there is no matching object.
*/
- (unsigned)indexOfObjectPassingTest:(Function)aPredicate
@@ -359,12 +358,10 @@ var concat = Array.prototype.concat,
/*!
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
@param predicate The function to apply to elements of the array. The function receives two arguments:
object The element in the array.
index The index of the element in the array.
context The object passed to the receiver in the aContext parameter.
@param predicate The function to apply to objects of the array. The function should have the signature:
@code function(object, index, context) @endcode
The predicate function should either return a Boolean value that indicates whether the object passed the test,
or nil to stop the search, which will return CPNotFound to the sender.
or nil to stop the search, which will return \c CPNotFound to the sender.
@param context An object that contains context information you want passed to the predicate function.
@return The index of the first matching object, or \c CPNotFound if there is no matching object.
*/
@@ -377,9 +374,8 @@ var concat = Array.prototype.concat,
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
@param options Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards
or CPEnumerationReverse to search in reverse.
@param predicate The function to apply to elements of the array. The function receives two arguments:
object The element in the array.
index The index of the element in the array.
@param predicate The function to apply to objects of the array. The function should have the signature:
@code function(object, index) @endcode
The predicate function should either return a Boolean value that indicates whether the object passed the test,
or nil to stop the search, which will return CPNotFound to the sender.
@return The index of the first matching object, or \c CPNotFound if there is no matching object.
@@ -393,10 +389,8 @@ var concat = Array.prototype.concat,
Returns the index of the first object in the receiver that passes a test in a given Javascript function.
@param options Specifies the direction in which the array is searched. Pass CPEnumerationNormal to search forwards
or CPEnumerationReverse to search in reverse.
@param predicate The function to apply to elements of the array. The function receives two arguments:
object The element in the array.
index The index of the element in the array.
context The object passed to the receiver in the aContext parameter.
@param predicate The function to apply to objects of the array. The function should have the signature:
@code function(object, index, context) @endcode
The predicate function should either return a Boolean value that indicates whether the object passed the test,
or nil to stop the search, which will return CPNotFound to the sender.
@param context An object that contains context information you want passed to the predicate function.
+1 -1
View File
@@ -125,7 +125,7 @@ var _CPKeyedArchiverStringClass = Nil,
*/
+ (void)initialize
{
if (self != [CPKeyedArchiver class])
if (self !== [CPKeyedArchiver class])
return;
_CPKeyedArchiverStringClass = [CPString class];
+1 -1
View File
@@ -166,7 +166,7 @@ var CPRunLoopLastNativeRunLoop = 0;
*/
+ (void)initialize
{
if (self != [CPRunLoop class])
if (self !== [CPRunLoop class])
return;
CPMainRunLoop = [[CPRunLoop alloc] init];
+33
View File
@@ -179,4 +179,37 @@
[self assertTrue:wasClicked message:@"a user click on a radio button should fire the group action"];
}
- (void)testTypeMasks
{
var button = [[CPButton alloc] initWithFrame:CGRectMakeZero()];
// The default mask should be that of CPMomentaryPushInButton.
[self assert:CPPushInButtonMask | CPGrayButtonMask | CPBackgroundButtonMask equals:[button highlightsBy]];
[self assert:0 equals:[button showsStateBy]];
[button setButtonType:CPPushOnPushOffButton];
[self assert:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask equals:[button highlightsBy]];
[self assert:CPChangeBackgroundCellMask | CPChangeGrayCellMask equals:[button showsStateBy]];
// Test archiving.
var archived = [CPKeyedArchiver archivedDataWithRootObject:button],
unarchived = [CPKeyedUnarchiver unarchiveObjectWithData:archived];
[self assert:CPPushInCellMask | CPChangeGrayCellMask | CPChangeBackgroundCellMask equals:[button highlightsBy]];
[self assert:CPChangeBackgroundCellMask | CPChangeGrayCellMask equals:[button showsStateBy]];
// Make sure that if highlightsBy and showsStateBy were explicitly set to 0 and 0 (making the button basically
// not react to clicks), these settings are not replaced by the defaults when decoding.
[button setHighlightsBy:0];
[button setShowsStateBy:0];
archived = [CPKeyedArchiver archivedDataWithRootObject:button];
unarchived = [CPKeyedUnarchiver unarchiveObjectWithData:archived];
[self assert:0 equals:[button highlightsBy]];
[self assert:0 equals:[button showsStateBy]];
}
@end
@@ -26,6 +26,9 @@
+ (void)initialize
{
if (self !== [StringToURLTransformer class])
return;
[CPValueTransformer setValueTransformer:[self new]
forName:@"StringToURLTransformer"];
}
+63
View File
@@ -17,13 +17,21 @@ CPLogRegister(CPLogConsole);
@outlet CPButton button;
@outlet CPButton imageButton;
@outlet CPButton imageDisabledButton;
@outlet CPButton pushInButton;
@outlet CPButton pushOnOffButton;
@outlet CPButton toggleButton;
@outlet CPButton momentaryChangeButton;
@outlet CPCheckBox checkbox;
@outlet CPCheckBox multiCheckbox;
@outlet CPRadio radio1;
@outlet CPRadio radio2;
@outlet CPPopUpButton positionMenu;
@outlet CPButton monkeyButton;
@outlet CPCheckBox monkeyCheckbox;
@outlet CPTextField clickCount;
@outlet CPTextField monkeyLabel;
@outlet CPTextField monkeyCheckboxLabel;
CPArray buttons;
CPArray checksAndRadios;
@@ -60,6 +68,27 @@ CPLogRegister(CPLogConsole);
[[radio1 radioGroup] setTarget:self];
[[radio1 radioGroup] setAction:@selector(radioGroupClicked:)];
[multiCheckbox setState:CPMixedState];
[pushInButton setButtonType:CPMomentaryLightButton];
[pushOnOffButton setButtonType:CPPushOnPushOffButton];
[toggleButton setButtonType:CPToggleButton];
[momentaryChangeButton setButtonType:CPMomentaryChangeButton];
[pushInButton setAlternateTitle:@"Should Not See Me"];
[toggleButton setAlternateTitle:@"Alternate Title For Toggle"];
[momentaryChangeButton setAlternateTitle:@"Changed!"];
[monkeyButton setAlternateTitle:@"Alternate title"];
var path = [[CPBundle bundleForClass:[CPView class]] pathForResource:@"action_button.png"];
[monkeyButton setAlternateImage:[[CPImage alloc] initWithContentsOfFile:path size:CGSizeMake(22.0, 14.0)]]
[monkeyButton setHighlightsBy:CPNoCellMask];
[monkeyButton setShowsStateBy:CPNoCellMask];
[monkeyCheckbox setAlternateTitle:@"Alternate title"];
[monkeyCheckbox setHighlightsBy:CPNoCellMask];
[monkeyCheckbox setShowsStateBy:CPNoCellMask];
CPLog(@"%@", [monkeyButton alternateTitle]);
}
- (void)setImagePosition:(id)sender
@@ -117,6 +146,40 @@ CPLogRegister(CPLogConsole);
CPLog.info("Radio group action sent!");
}
- (IBAction)setMonkeyButtonHighlightedBy:(id)aSender
{
if ([aSender state] == CPOnState)
{
[monkeyButton setHighlightsBy:[monkeyButton highlightsBy] | [aSender tag]];
[monkeyCheckbox setHighlightsBy:[monkeyCheckbox highlightsBy] | [aSender tag]];
}
else
{
[monkeyButton setHighlightsBy:[monkeyButton highlightsBy] ^ [aSender tag]];
[monkeyCheckbox setHighlightsBy:[monkeyCheckbox highlightsBy] ^ [aSender tag]];
}
}
- (IBAction)setMonkeyButtonShowsStateBy:(id)aSender
{
if ([aSender state] == CPOnState)
{
[monkeyButton setShowsStateBy:[monkeyButton showsStateBy] | [aSender tag]];
[monkeyCheckbox setShowsStateBy:[monkeyCheckbox showsStateBy] | [aSender tag]];
}
else
{
[monkeyButton setShowsStateBy:[monkeyButton showsStateBy] ^ [aSender tag]];
[monkeyCheckbox setShowsStateBy:[monkeyCheckbox showsStateBy] ^ [aSender tag]];
}
}
- (IBAction)monkeyClick:(id)aSender
{
[monkeyLabel setStringValue:[CPString stringWithFormat:@"State: %d", [monkeyButton state]]];
[monkeyCheckboxLabel setStringValue:[CPString stringWithFormat:@"State: %d", [monkeyCheckbox state]]];
}
@end
@implementation BezelView : CPView
+2 -4
View File
@@ -5,8 +5,6 @@
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>CPButtonImageTest</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
<string>CPButton</string>
</dict>
</plist>
</plist>
@@ -1 +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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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;68E;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;69E;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;59E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;70E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;71E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;54E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;72E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;65E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;73E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;52E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;58E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;75E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;55E;K;23;_CPCibConnectorLabeLine truncated
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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d;2;81E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;2;91E;D;K;6;CLine truncated
File diff suppressed because it is too large. Load diff
+63 -29
View File
@@ -1,28 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
TableCibTest
CPButton
Created by Francisco Tolmasky on July 5, 2009.
Copyright 2009, 280 North, Inc. All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<title>CPButton Image Test</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type = "text/javascript">
<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>CPButton</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"></script>
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type = "text/css">
<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;}
@@ -40,29 +72,31 @@
</head>
<body style="">
<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 CPButton Image Test...</p></div>");
</script>
<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 CPButton...</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>
<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>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
+38 -29
View File
@@ -1,27 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
TableCibTest
CPButton
Created by Francisco Tolmasky on July 5, 2009.
Copyright 2009, 280 North, Inc. All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<title>CPButton Image Test</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type = "text/javascript">
<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>CPButton</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type = "text/css">
<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;}
@@ -39,29 +46,31 @@
</head>
<body style="">
<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 CPButton Image Test...</p></div>");
</script>
<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 CPButton...</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>
<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>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
Executable → Regular
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* AppController.j
* TableCibTest
* CPButton
*
* Created by Francisco Tolmasky on July 5, 2009.
* Copyright 2009, 280 North, Inc. All rights reserved.
@@ -0,0 +1,41 @@
/*
* AppController.j
* CPPopUpButtonBindings
*
* Created by You on December 2, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
@outlet CPWindow mainWindow;
@outlet CPPopUpButton tagPopUp;
CPArray people @accessors;
}
- (void)awakeFromCib
{
var array = [];
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"John",@"name",@"Butcher",@"job",@"john@meat.com",@"email", 2, @"tag"]];
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"Alberto",@"name",@"Seller",@"job",@"alberto@gmail.com",@"email", 0, @"tag"]];
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"Barack",@"name",@"President",@"job",@"barack@whitehouse.gov",@"email", 1, @"tag"]];
[self setPeople:array];
// Setup tags for the second popup
var items = [tagPopUp itemArray];
[items enumerateObjectsUsingBlock:function(item, idx)
{
[item setTag:idx];
[item setTitle:([item title] + " Tag:" + idx)];
}];
[mainWindow setFullBridge:YES];
}
@end
+1
View File
@@ -0,0 +1 @@
../../../AppKit/CPPopUpButton.j
@@ -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>CPPopUpButtonBindings</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
</dict>
</plist>
@@ -0,0 +1,94 @@
/*
* Jakefile
* CPPopUpButtonBindings
*
* Created by You on November 2, 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 ("CPPopUpButtonBindings", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "CPPopUpButtonBindings.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CPPopUpButtonBindings");
task.setIdentifier("com.yourcompany.CPPopUpButtonBindings");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("CPPopUpButtonBindings");
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", ["CPPopUpButtonBindings"], 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", "CPPopUpButtonBindings", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "CPPopUpButtonBindings", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopUpButtonBindings"));
OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopUpButtonBindings"), FILE.join("Build", "Deployment", "CPPopUpButtonBindings")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopUpButtonBindings"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopUpButtonBindings"), FILE.join("Build", "Desktop", "CPPopUpButtonBindings", "CPPopUpButtonBindings.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "CPPopUpButtonBindings", "CPPopUpButtonBindings.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopUpButtonBindings"));
print("----------------------------");
}
@@ -0,0 +1,4 @@
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;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;30E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;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;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;41E;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;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;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d;2;51E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;68E;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;88E;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;89E;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;81E;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;81E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;47E;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;81E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;48E;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;81E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;93E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;81E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDLine truncated
arrangedObjects.selectionIndexS;22;{{496, 68}, {217, 42}}S;34;CPSelectedTagBinding
selection.tagS;23;{{496, 118}, {217, 42}}S;37;CPSelectedValueBinding
selection.nameS;22;{{729, 77}, {191, 24}}S;19;{{0, 0}, {191, 24}}S;12;popup-buttonS;8;borderedD;K;6;$classD;K;6;CP$UIDd;3;162E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;258E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;159E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;166E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;204E;E;S;6;Item 1S;17;_popUpItemAction:d;1;1d;7;1048576S;6;Item 2S;6;Item 3S;22;{{729, 32}, {191, 24}}S;23;{{729, 127}, {191, 24}}S;13;AppControllerS;12;CPDictionaryS;10;OtherViewsD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;72E;E;E;S;17;Arial, sans-serifD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;56E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;169E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;288E;E;S;21;{{0, 243}, {461, 17}}S;19;{{0, 0}, {461, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;63E;E;E;S;16;{{0, 0}, {0, 0}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;289E;D;K;6;CP$UIDd;3;289E;D;K;6;CP$UIDd;3;289E;D;K;6;CP$UIDd;3;246E;E;E;S;22;{{467, 237}, {16, 23}}S;18;{{0, 0}, {16, 23}}S;10;cornerviewD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;291E;E;E;S;12;columnHeaderS;11;placeholderD;K;10;$classnameS;17;_CPThemeAttributeK;8;$classesA;S;17;_CPThemeAttributeS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;273E;K;4;nameD;K;6;CP$UIDd;3;292E;K;12;defaultValueD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;293E;E;D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;275E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;294E;E;S;8;compare:D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;295E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;273E;K;4;nameD;K;6;CP$UIDd;3;292E;K;12;defaultValueD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;296E;E;D;K;6;$classD;K;6;CP$UIDd;3;275E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;294E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;297E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;273E;K;4;nameD;K;6;CP$UIDd;3;292E;K;12;defaultValueD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;298E;E;D;K;6;$classD;K;6;CP$UIDd;3;275E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;294E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;299E;E;E;S;3;TagD;K;6;$classD;K;6;CP$UIDd;3;273E;K;4;nameD;K;6;CP$UIDd;3;292E;K;12;defaultValueD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;300E;E;D;K;6;$classD;K;6;CP$UIDd;3;275E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;294E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;246E;E;E;f;3;0.5D;K;10;$classnameS;19;_CPImageAndTextViewK;8;$classesA;S;19;_CPImageAndTextViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;290E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;212E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;265E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;265E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;212E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;301E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;156E;E;S;4;fontD;K;6;$classD;K;6;CP$UIDd;3;101E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;243E;K;6;normalD;K;6;CP$UIDd;3;163E;E;E;S;39;{"top":0,"right":5,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;3;290E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;219E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;265E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;265E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;219E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;301E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;156E;E;D;K;6;$classD;K;6;CP$UIDd;3;101E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;243E;K;6;normalD;K;6;CP$UIDd;3;163E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;290E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;223E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;265E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;265E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;223E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;301E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;156E;E;D;K;6;$classD;K;6;CP$UIDd;3;101E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;243E;K;6;normalD;K;6;CP$UIDd;3;163E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;290E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;227E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;265E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;265E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;227E;K;22;CPViewAutoresizingMaLine truncated
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,104 @@
<!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
CPPopUpButtonBindings
Created by You on November 2, 2010.
Copyright 2010, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="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>CPPopUpButtonBindings</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 CPPopUpButtonBindings...</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
CPPopUpButtonBindings
Created by You on November 2, 2010.
Copyright 2010, Your Company All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="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>CPPopUpButtonBindings</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 CPPopUpButtonBindings...</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>
+18
View File
@@ -0,0 +1,18 @@
/*
* AppController.j
* CPPopUpButtonBindings
*
* Created by You on November 2, 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);
}
+30 -30
View File
@@ -34,18 +34,18 @@
[contentView addSubview:label];
var keysToTest = [
"a",
";",
"-",
"=",
",",
".",
"/",
"`",
"'",
"[",
"\\",
"]"
"a",
";",
"-",
"=",
",",
".",
"/",
"`",
"'",
"[",
"\\",
"]"
];
for (var i = 0; i < keysToTest.length; i++)
@@ -69,23 +69,23 @@
[contentView addSubview:label];
var functionKeysToTest = [
["backspace", CPBackspaceCharacter],
["delete char", CPDeleteCharacter],
["delete key", CPDeleteFunctionKey],
["tab", CPTabCharacter],
["carriage return", CPCarriageReturnCharacter],
["newline", CPNewlineCharacter],
["space", CPSpaceFunctionKey],
["esc", CPEscapeFunctionKey],
["pgup", CPPageUpFunctionKey],
["pgdn", CPPageDownFunctionKey],
["left arrow", CPLeftArrowFunctionKey],
["up arrow", CPUpArrowFunctionKey],
["right arrow", CPRightArrowFunctionKey],
["down arrow", CPDownArrowFunctionKey],
["home", CPHomeFunctionKey],
["end", CPEndFunctionKey]
];
["backspace", CPBackspaceCharacter],
["delete char", CPDeleteCharacter],
["delete key", CPDeleteFunctionKey],
["tab", CPTabCharacter],
["carriage return", CPCarriageReturnCharacter],
["newline", CPNewlineCharacter],
["space", CPSpaceFunctionKey],
["esc", CPEscapeFunctionKey],
["pgup", CPPageUpFunctionKey],
["pgdn", CPPageDownFunctionKey],
["left arrow", CPLeftArrowFunctionKey],
["up arrow", CPUpArrowFunctionKey],
["right arrow", CPRightArrowFunctionKey],
["down arrow", CPDownArrowFunctionKey],
["home", CPHomeFunctionKey],
["end", CPEndFunctionKey]
];
for (var i = 0, buttonsWide = 6, yOffset = 0; i < functionKeysToTest.length; i++)
{
@@ -120,7 +120,7 @@
@end
@implementation TestButton :CPButton
@implementation TestButton : CPButton
{
}
+2 -1
View File
@@ -21,7 +21,8 @@ BorderViewDefaultBorderColor = nil;
+ (void)initialize
{
BorderViewDefaultBorderColor = [CPColor colorWithHexString:@"0000ff"];
if (self === [BorderView class])
BorderViewDefaultBorderColor = [CPColor colorWithHexString:@"0000ff"];
}
- (id)initWithFrame:(CGRect)aFrame
+36 -1
View File
@@ -50,7 +50,18 @@ var NSButtonIsBorderedMask = 0x00800000,
NSButtonImageRightPositionMask = 0x2C,
NSButtonImageLeftPositionMask = 0x3C,
NSButtonImageOnlyPositionMask = 0x44,
NSButtonImageOverlapsPositionMask = 0x6C;
NSButtonImageOverlapsPositionMask = 0x6C,
// You cannot set neither highlightsBy nor showsStateBy in IB,
// but you can set button type which implicitly sets the masks.
// Note that you cannot set NSPushInCellMask for showsStateBy.
NSHighlightsByPushInCellMask = 0x80000000,
NSHighlightsByContentsCellMask = 0x08000000,
NSHighlightsByChangeGrayCellMask = 0x04000000,
NSHighlightsByChangeBackgroundCellMask = 0x02000000,
NSShowsStateByContentsCellMask = 0x40000000,
NSShowsStateByChangeGrayCellMask = 0x20000000,
NSShowsStateByChangeBackgroundCellMask = 0x10000000;
@implementation CPButton (NSCoding)
@@ -204,6 +215,9 @@ var NSButtonIsBorderedMask = 0x00800000,
[self setEnabled:[cell isEnabled]];
_highlightsBy = [cell highlightsBy];
_showsStateBy = [cell showsStateBy];
return self;
}
@@ -235,6 +249,9 @@ var NSButtonIsBorderedMask = 0x00800000,
BOOL _allowsMixedState @accessors(readonly, getter=allowsMixedState);
BOOL _imagePosition @accessors(readonly, getter=imagePosition);
int _highlightsBy @accessors(readonly, getter=highlightsBy);
int _showsStateBy @accessors(readonly, getter=showsStateBy);
CPString _keyEquivalent @accessors(readonly, getter=keyEquivalent);
unsigned _keyEquivalentModifierMask @accessors(readonly, getter=keyEquivalentModifierMask);
}
@@ -280,6 +297,24 @@ var NSButtonIsBorderedMask = 0x00800000,
else if ((position & NSButtonNoImagePositionMask) == NSButtonNoImagePositionMask)
_imagePosition = CPNoImage;
_highlightsBy = CPNoCellMask;
if (buttonFlags & NSHighlightsByPushInCellMask)
_highlightsBy |= CPPushInCellMask;
if (buttonFlags & NSHighlightsByContentsCellMask)
_highlightsBy |= CPContentsCellMask;
if (buttonFlags & NSHighlightsByChangeGrayCellMask)
_highlightsBy |= CPChangeGrayCellMask;
if (buttonFlags & NSHighlightsByChangeBackgroundCellMask)
_highlightsBy |= CPChangeBackgroundCellMask;
_showsStateBy = CPNoCellMask;
if (buttonFlags & NSShowsStateByContentsCellMask)
_showsStateBy |= CPContentsCellMask;
if (buttonFlags & NSShowsStateByChangeGrayCellMask)
_showsStateBy |= CPChangeGrayCellMask;
if (buttonFlags & NSShowsStateByChangeBackgroundCellMask)
_showsStateBy |= CPChangeBackgroundCellMask;
_keyEquivalent = [aCoder decodeObjectForKey:@"NSKeyEquivalent"];
_keyEquivalentModifierMask = buttonFlags2 >> 8;
}
+3
View File
@@ -54,6 +54,9 @@ var IBDefaultFontFace = @"Lucida Grande",
+ (void)initialize
{
if (self !== [NSFont class])
return;
CPLog.debug("NSFont: default IB font: %s %f", IBDefaultFontFace, IBDefaultFontSize);
}