mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 08:32:58 +00:00
Merge pull request #1573 from mrcarlberg/binding_support_popup_button
Added key value binding support for CPPopupButton
This commit is contained in:
commit
0922f3dab7
13 files changed
+2372
-36
No files matched your search
+35
-15
@@ -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)
|
||||
@@ -546,20 +551,35 @@ CPNotApplicableMarker = @"CPNotApplicableMarker";
|
||||
CPNullMarker = @"CPNullMarker";
|
||||
|
||||
// Binding name constants
|
||||
CPAlignmentBinding = @"alignment";
|
||||
CPEditableBinding = @"editable";
|
||||
CPEnabledBinding = @"enabled";
|
||||
CPFontBinding = @"font";
|
||||
CPHiddenBinding = @"hidden";
|
||||
CPSelectedIndexBinding = @"selectedIndex";
|
||||
CPTextColorBinding = @"textColor";
|
||||
CPToolTipBinding = @"toolTip";
|
||||
CPValueBinding = @"value";
|
||||
CPValueURLBinding = @"valueURL";
|
||||
CPValuePathBinding = @"valuePath";
|
||||
CPDataBinding = @"data";
|
||||
CPContentBinding = @"content";
|
||||
CPContentValuesBinding = @"contentValues";
|
||||
CPAlignmentBinding = @"alignment";
|
||||
CPContentArrayBinding = @"contentArray";
|
||||
CPContentBinding = @"content";
|
||||
CPContentObjectBinding = @"contentObject";
|
||||
CPContentObjectsBinding = @"contentObjects";
|
||||
CPContentValuesBinding = @"contentValues";
|
||||
CPEditableBinding = @"editable";
|
||||
CPEnabledBinding = @"enabled";
|
||||
CPFontBinding = @"font";
|
||||
CPFontNameBinding = @"fontName";
|
||||
CPFontBoldBinding = @"fontBold";
|
||||
CPHiddenBinding = @"hidden";
|
||||
CPFilterPredicateBinding = @"filterPredicate";
|
||||
CPPredicateBinding = @"predicate";
|
||||
CPSelectedIndexBinding = @"selectedIndex";
|
||||
CPSelectedLabelBinding = @"selectedLabel";
|
||||
CPSelectedObjectBinding = @"selectedObject";
|
||||
CPSelectedObjectsBinding = @"selectedObjects";
|
||||
CPSelectedTagBinding = @"selectedTag";
|
||||
CPSelectedValueBinding = @"selectedValue";
|
||||
CPSelectedValuesBinding = @"selectedValues";
|
||||
CPSelectionIndexesBinding = @"selectionIndexes";
|
||||
CPTextColorBinding = @"textColor";
|
||||
CPTitleBinding = @"title";
|
||||
CPToolTipBinding = @"toolTip";
|
||||
CPValueBinding = @"value";
|
||||
CPValueURLBinding = @"valueURL";
|
||||
CPValuePathBinding = @"valuePath";
|
||||
CPDataBinding = @"data";
|
||||
|
||||
//Binding options constants
|
||||
CPAllowsEditingMultipleValuesSelectionBindingOption = @"CPAllowsEditingMultipleValuesSelection";
|
||||
|
||||
+275
-21
@@ -23,10 +23,10 @@
|
||||
@import <Foundation/CPGeometry.j>
|
||||
|
||||
@import "CPButton.j"
|
||||
@import "CPKeyValueBinding.j"
|
||||
@import "CPMenu.j"
|
||||
@import "CPMenuItem.j"
|
||||
|
||||
|
||||
var VISIBLE_MARGIN = 7.0;
|
||||
|
||||
CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
|
||||
@@ -247,22 +247,6 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
|
||||
return _selectedIndex;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (int)_selectedTag
|
||||
{
|
||||
return [[self selectedItem] tag];
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (void)_setSelectedTag:(int)aTag
|
||||
{
|
||||
[self selectItemWithTag:aTag];
|
||||
}
|
||||
|
||||
// Setting the Current Selection
|
||||
/*!
|
||||
Selects the specified menu item.
|
||||
@@ -787,16 +771,286 @@ 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];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPPopUpButton (BindingSupport)
|
||||
|
||||
+ (Class)_binderClassForBinding:(CPString)aBinding
|
||||
{
|
||||
if (aBinding == CPSelectedIndexBinding ||
|
||||
aBinding == CPSelectedObjectBinding ||
|
||||
aBinding == CPSelectedTagBinding ||
|
||||
aBinding == CPSelectedValueBinding ||
|
||||
aBinding == CPContentBinding ||
|
||||
aBinding == CPContentObjectsBinding ||
|
||||
aBinding == CPContentValuesBinding)
|
||||
{
|
||||
var capitalizedBinding = aBinding.charAt(0).toUpperCase() + aBinding.substr(1);
|
||||
|
||||
return [CPClassFromString(@"_CPPopUpButton" + capitalizedBinding + "Binder") class];
|
||||
}
|
||||
|
||||
return [super _binderClassForBinding:aBinding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonContentBinder : CPBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (CPInteger)_getInsertNullOffset
|
||||
{
|
||||
var options = [_info objectForKey:CPOptionsKey];
|
||||
|
||||
return [options objectForKey:CPInsertsNullPlaceholderBindingOption] ? 1 : 0;
|
||||
}
|
||||
|
||||
- (CPString)_getNullPlaceholder
|
||||
{
|
||||
var options = [_info objectForKey:CPOptionsKey],
|
||||
placeholder = [options objectForKey:CPNullPlaceholderBindingOption] || @"";
|
||||
|
||||
if (placeholder === [CPNull null])
|
||||
placeholder = @"";
|
||||
|
||||
return placeholder;
|
||||
}
|
||||
|
||||
- (id)transformValue:(CPArray)contentArray withOptions:(CPDictionary)options
|
||||
{
|
||||
// Desactivate the full array transformation forced by super because we don't want this. We want individual transformations (see below).
|
||||
return contentArray;
|
||||
}
|
||||
|
||||
- (void)setValue:(CPArray)contentArray forBinding:(CPString)aBinding
|
||||
{
|
||||
[self _setContent:contentArray];
|
||||
[self _setContentValuesIfNeeded:contentArray];
|
||||
}
|
||||
|
||||
- (void)valueForBinding:(CPString)aBinding
|
||||
{
|
||||
return [self _content];
|
||||
}
|
||||
|
||||
- (void)_setContent:(CPArray)aValue
|
||||
{
|
||||
var count = [aValue count],
|
||||
options = [_info objectForKey:CPOptionsKey],
|
||||
offset = [self _getInsertNullOffset];
|
||||
|
||||
if (count + offset != [_source numberOfItems])
|
||||
{
|
||||
[_source removeAllItems];
|
||||
|
||||
if (offset)
|
||||
[_source addItemWithTitle:[self _getNullPlaceholder]];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var item = [[CPMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:nil];
|
||||
[self _setValue:[aValue objectAtIndex:i] forItem:item withOptions:options];
|
||||
[_source addItem:item];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
[self _setValue:[aValue objectAtIndex:i] forItem:[_source itemAtIndex:i + offset] withOptions:options];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_setContentValuesIfNeeded:(CPArray)values
|
||||
{
|
||||
var offset = [self _getInsertNullOffset];
|
||||
|
||||
if (![_source infoForBinding:CPContentValuesBinding])
|
||||
{
|
||||
if (offset)
|
||||
[[_source itemAtIndex:0] setTitle:[self _getNullPlaceholder]];
|
||||
|
||||
var count = [values count];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
[[_source itemAtIndex:i + offset] setTitle:[[values objectAtIndex:i] description]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_setValue:(id)aValue forItem:(CPMenuItem)aMenuItem withOptions:(CPDictionary)options
|
||||
{
|
||||
var value = [self _transformValue:aValue withOptions:options];
|
||||
[aMenuItem setRepresentedObject:value];
|
||||
}
|
||||
|
||||
- (id)_transformValue:(id)aValue withOptions:(CPDictionary)options
|
||||
{
|
||||
return [super transformValue:aValue withOptions:options];
|
||||
}
|
||||
|
||||
- (CPArray)_content
|
||||
{
|
||||
return [_source valueForKeyPath:@"itemArray.representedObject"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonContentValuesBinder : _CPPopUpButtonContentBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
|
||||
{
|
||||
[super _setContent:aValue];
|
||||
}
|
||||
|
||||
- (void)_setValue:(id)aValue forItem:(CPMenuItem)aMenuItem withOptions:(CPDictionary)options
|
||||
{
|
||||
if (aValue === [CPNull null])
|
||||
aValue = nil;
|
||||
|
||||
var value = [self _transformValue:aValue withOptions:options];
|
||||
[aMenuItem setTitle:value];
|
||||
}
|
||||
|
||||
- (CPArray)_content
|
||||
{
|
||||
return [_source valueForKeyPath:@"itemArray.title"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var binderForObject = {};
|
||||
|
||||
@implementation _CPPopUpButtonSelectionBinder : CPBinder
|
||||
{
|
||||
CPString _selectionBinding @accessors;
|
||||
}
|
||||
|
||||
- (id)initWithBinding:(CPString)aBinding name:(CPString)aName to:(id)aDestination keyPath:(CPString)aKeyPath options:(CPDictionary)options from:(id)aSource
|
||||
{
|
||||
self = [super initWithBinding:aBinding name:aName to:aDestination keyPath:aKeyPath options:options from:aSource];
|
||||
|
||||
if (self)
|
||||
{
|
||||
binderForObject[[aSource UID]] = self;
|
||||
_selectionBinding = aName;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (void)reverseSetValueForObject:(id)aSource
|
||||
{
|
||||
var binder = binderForObject[[aSource UID]];
|
||||
[binder reverseSetValueFor:[binder _selectionBinding]];
|
||||
}
|
||||
|
||||
- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding
|
||||
{
|
||||
[self setValue:aValue forBinding:aBinding];
|
||||
}
|
||||
|
||||
- (CPInteger)_getInsertNullOffset
|
||||
{
|
||||
var options = [[CPBinder infoForBinding:CPContentBinding forObject:_source] objectForKey:CPOptionsKey];
|
||||
|
||||
return [options objectForKey:CPInsertsNullPlaceholderBindingOption] ? 1 : 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonSelectedIndexBinder : _CPPopUpButtonSelectionBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
|
||||
{
|
||||
[_source selectItemAtIndex:aValue + [self _getInsertNullOffset]];
|
||||
}
|
||||
|
||||
- (id)valueForBinding:(CPString)aBinding
|
||||
{
|
||||
return [_source indexOfSelectedItem] - [self _getInsertNullOffset];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonSelectedObjectBinder : _CPPopUpButtonSelectionBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
|
||||
{
|
||||
var index = [_source indexOfItemWithRepresentedObject:aValue],
|
||||
offset = [self _getInsertNullOffset];
|
||||
|
||||
// If the content binding has the option CPNullPlaceholderBindingOption and the object to select is nil, select the first item (i.e., the placeholder).
|
||||
// Other cases to consider:
|
||||
// 1. no binding:
|
||||
// 1.1 there's no item with a represented object matching the object to select.
|
||||
// 1.2 the object to select is nil/CPNull
|
||||
// 2. there's a binding:
|
||||
// 2.1 there's a CPNullPlaceholderBindingOption:
|
||||
// 2.1.1 there's no item with a represented object matching the object to select?
|
||||
// 2.1.2 the object to select is nil/CPNull
|
||||
// 2.2 there's no CPNullPlaceholderBindingOption:
|
||||
// 2.2.1 there's no item with a represented object matching the object to select?
|
||||
// 2.2.2 the object to select is nil/CPNull
|
||||
// More cases? Behaviour that depends on array controller settings?
|
||||
|
||||
if (offset === 1 && index === CPNotFound)
|
||||
index = 0;
|
||||
|
||||
[_source selectItemAtIndex:index];
|
||||
}
|
||||
|
||||
- (id)valueForBinding:(CPString)aBinding
|
||||
{
|
||||
return [[_source selectedItem] representedObject];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonSelectedTagBinder : _CPPopUpButtonSelectionBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
|
||||
{
|
||||
[_source selectItemWithTag:aValue];
|
||||
}
|
||||
|
||||
- (id)valueForBinding:(CPString)aBinding
|
||||
{
|
||||
return [[_source selectedItem] tag];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPPopUpButtonSelectedValueBinder : _CPPopUpButtonSelectionBinder
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setValue:(id)aValue forBinding:(CPString)aBinding
|
||||
{
|
||||
[_source selectItemWithTitle:aValue];
|
||||
}
|
||||
|
||||
- (id)valueForBinding:(CPString)aBinding
|
||||
{
|
||||
return [_source titleOfSelectedItem];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var DEPRECATED_CPPopUpButtonMenuKey = @"CPPopUpButtonMenuKey",
|
||||
DEPRECATED_CPPopUpButtonSelectedIndexKey = @"CPPopUpButtonSelectedIndexKey";
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
@import <AppKit/CPKeyValueBinding.j>
|
||||
@import <AppKit/CPPopUpButton.j>
|
||||
@import <AppKit/CPApplication.j>
|
||||
|
||||
@implementation CPPopUpButtonTest : OJTestCase
|
||||
{
|
||||
CPPopUpButton button @accessors;
|
||||
id objects @accessors;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
@@ -205,6 +207,251 @@
|
||||
[self assert:2 equals:[[self button] indexOfItemWithTitle:@"three"]];
|
||||
}
|
||||
|
||||
- (void)testSimpleStringBindingArrayController
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
objectController = [[CPObjectController alloc] init],
|
||||
testObject = [CPMutableDictionary dictionary],
|
||||
martin = @"Martin",
|
||||
malte = @"Malte",
|
||||
johan = @"Johan",
|
||||
menuObjects = [martin, malte, johan];
|
||||
|
||||
[testObject setObject:@"I'm a testObject" forKey:@"Who am I"];
|
||||
[arrayController setContent:menuObjects];
|
||||
[objectController setContent:testObject];
|
||||
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:nil];
|
||||
[button bind:CPSelectedObjectBinding toObject:objectController withKeyPath:@"selection.xxx" options:nil];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Martin"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self]; // This has to be done to trigger the reverse set of the binding
|
||||
[self assert:martin equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Malte"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:malte equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Johan"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:johan equals:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[testObject setObject:martin forKey:@"xxx"];
|
||||
[self assert:0 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:malte forKey:@"xxx"];
|
||||
[self assert:1 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:johan forKey:@"xxx"];
|
||||
[self assert:2 equals:[[self button] indexOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)testSimpleStringBindingNullPlaceholderOption
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
objectController = [[CPObjectController alloc] init],
|
||||
testObject = [CPMutableDictionary dictionary],
|
||||
martin = @"Martin",
|
||||
malte = @"Malte",
|
||||
johan = @"Johan",
|
||||
menuObjects = [martin, malte, johan],
|
||||
insertsNullPlaceholderOption = [CPDictionary dictionaryWithObjects:[YES, @"Null Placeholder"] forKeys:[CPInsertsNullPlaceholderBindingOption, CPNullPlaceholderBindingOption]];
|
||||
|
||||
[testObject setObject:@"I'm a testObject" forKey:@"Who am I"];
|
||||
[arrayController setContent:menuObjects];
|
||||
[objectController setContent:testObject];
|
||||
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:insertsNullPlaceholderOption];
|
||||
[button bind:CPSelectedObjectBinding toObject:objectController withKeyPath:@"selection.xxx" options:insertsNullPlaceholderOption];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Martin"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self]; // This has to be done to trigger the reverse set of the binding
|
||||
[self assert:martin equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Malte"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:malte equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Johan"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:johan equals:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Null Placeholder"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assertNull:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[testObject setObject:martin forKey:@"xxx"];
|
||||
[self assert:1 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:malte forKey:@"xxx"];
|
||||
[self assert:2 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:johan forKey:@"xxx"];
|
||||
[self assert:3 equals:[[self button] indexOfSelectedItem]];
|
||||
|
||||
[testObject removeObjectForKey:@"xxx"];
|
||||
[self assert:0 equals:[[self button] indexOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)testSimpleObjectBindingArrayController
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
objectController = [[CPObjectController alloc] init],
|
||||
testObject = [CPMutableDictionary dictionary],
|
||||
martin = [CPDictionary dictionaryWithJSObject:{@"name": @"Martin"}],
|
||||
malte = [CPDictionary dictionaryWithJSObject:{@"name": @"Malte"}],
|
||||
johan = [CPDictionary dictionaryWithJSObject:{@"name": @"Johan"}],
|
||||
menuObjects = [martin, malte, johan];
|
||||
|
||||
[testObject setObject:@"I'm a testObject" forKey:@"Who am I"];
|
||||
[arrayController setContent:menuObjects];
|
||||
[objectController setContent:testObject];
|
||||
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:nil];
|
||||
[button bind:CPContentValuesBinding toObject:arrayController withKeyPath:@"arrangedObjects.name" options:nil];
|
||||
[button bind:CPSelectedObjectBinding toObject:objectController withKeyPath:@"selection.xxx" options:nil];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Martin"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self]; // This has to be done to trigger the reverse set of the binding
|
||||
[self assert:martin equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Malte"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:malte equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Johan"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:johan equals:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[testObject setObject:martin forKey:@"xxx"];
|
||||
[self assert:0 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:malte forKey:@"xxx"];
|
||||
[self assert:1 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:johan forKey:@"xxx"];
|
||||
[self assert:2 equals:[[self button] indexOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)testObjectBindingNullPlaceholderOption
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
martin = [CPDictionary dictionaryWithJSObject:{@"name": @"Martin"}],
|
||||
malte = [CPDictionary dictionaryWithJSObject:{@"name": @"Malte"}],
|
||||
johan = [CPDictionary dictionaryWithJSObject:{@"name": @"Johan"}],
|
||||
menuObjects = [martin, malte, johan],
|
||||
insertsNullPlaceholderOption = [CPDictionary dictionaryWithObjects:[YES, @"Null Placeholder"] forKeys:[CPInsertsNullPlaceholderBindingOption, CPNullPlaceholderBindingOption]];
|
||||
|
||||
[arrayController setContent:menuObjects];
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:insertsNullPlaceholderOption];
|
||||
[button bind:CPContentValuesBinding toObject:arrayController withKeyPath:@"arrangedObjects.name" options:insertsNullPlaceholderOption];
|
||||
|
||||
[self assert:4 equals:[[self button] numberOfItems]];
|
||||
[self assert:0 equals:[[self button] indexOfItemWithTitle:@"Null Placeholder"]];
|
||||
[self assert:1 equals:[[self button] indexOfItemWithTitle:@"Martin"]];
|
||||
[self assert:2 equals:[[self button] indexOfItemWithTitle:@"Malte"]];
|
||||
[self assert:3 equals:[[self button] indexOfItemWithTitle:@"Johan"]];
|
||||
|
||||
[button unbind:CPContentValuesBinding];
|
||||
[button unbind:CPContentBinding];
|
||||
[button bind:CPContentValuesBinding toObject: arrayController withKeyPath:@"arrangedObjects.name" options:nil];
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:nil];
|
||||
|
||||
[self assert:3 equals:[[self button] numberOfItems]];
|
||||
[self assert:0 equals:[[self button] indexOfItemWithTitle:@"Martin"]];
|
||||
[self assert:1 equals:[[self button] indexOfItemWithTitle:@"Malte"]];
|
||||
[self assert:2 equals:[[self button] indexOfItemWithTitle:@"Johan"]];
|
||||
}
|
||||
|
||||
- (void)testSelectedObjectBindingArrayController
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
objectController = [[CPObjectController alloc] init],
|
||||
testObject = [CPMutableDictionary dictionary],
|
||||
martin = [CPDictionary dictionaryWithJSObject:{@"name": @"Martin"}],
|
||||
malte = [CPDictionary dictionaryWithJSObject:{@"name": @"Malte"}],
|
||||
johan = [CPDictionary dictionaryWithJSObject:{@"name": @"Johan"}],
|
||||
menuObjects = [martin, malte, johan],
|
||||
insertsNullPlaceholderOption = [CPDictionary dictionaryWithObjects:[YES, @"Null Placeholder"] forKeys:[CPInsertsNullPlaceholderBindingOption, CPNullPlaceholderBindingOption]];
|
||||
|
||||
[testObject setObject:@"I'm a testObject" forKey:@"Who am I"];
|
||||
[arrayController setContent:menuObjects];
|
||||
[objectController setContent:testObject];
|
||||
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:insertsNullPlaceholderOption];
|
||||
[button bind:CPContentValuesBinding toObject:arrayController withKeyPath:@"arrangedObjects.name" options:insertsNullPlaceholderOption];
|
||||
[button bind:CPSelectedObjectBinding toObject:objectController withKeyPath:@"selection.xxx" options:nil];
|
||||
|
||||
[self assert:4 equals:[[self button] numberOfItems]];
|
||||
[self assert:0 equals:[[self button] indexOfItemWithTitle:@"Null Placeholder"]];
|
||||
[self assert:1 equals:[[self button] indexOfItemWithTitle:@"Martin"]];
|
||||
[self assert:2 equals:[[self button] indexOfItemWithTitle:@"Malte"]];
|
||||
[self assert:3 equals:[[self button] indexOfItemWithTitle:@"Johan"]];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Martin"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self]; // This has to be done to trigger the reverse set of the binding
|
||||
[self assert:martin equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Malte"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:malte equals:[testObject objectForKey:@"xxx"]];
|
||||
[[self button] selectItemWithTitle:@"Johan"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:johan equals:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Null Placeholder"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assertNull:[testObject objectForKey:@"xxx"]];
|
||||
|
||||
[testObject setObject:martin forKey:@"xxx"];
|
||||
[self assert:1 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:malte forKey:@"xxx"];
|
||||
[self assert:2 equals:[[self button] indexOfSelectedItem]];
|
||||
[testObject setObject:johan forKey:@"xxx"];
|
||||
[self assert:3 equals:[[self button] indexOfSelectedItem]];
|
||||
|
||||
[testObject removeObjectForKey:@"xxx"];
|
||||
[self assert:0 equals:[[self button] indexOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)testContentValuesWithValueTransformer
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
martin = [CPDictionary dictionaryWithJSObject:{@"name": @"Martin"}],
|
||||
malte = [CPDictionary dictionaryWithJSObject:{@"name": @"Malte"}],
|
||||
johan = [CPDictionary dictionaryWithJSObject:{@"name": @"Johan"}],
|
||||
menuObjects = [martin, malte, johan];
|
||||
|
||||
[arrayController setContent:menuObjects];
|
||||
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:nil];
|
||||
var options = [CPDictionary dictionary];
|
||||
[options setObject:[ContentValuesTransformer new] forKey:CPValueTransformerBindingOption];
|
||||
[button bind:CPContentValuesBinding toObject:arrayController withKeyPath:@"arrangedObjects.name" options:options];
|
||||
|
||||
[self assert:@"Transformed-Malte" equals:[[[self button] itemAtIndex:1] title]];
|
||||
}
|
||||
|
||||
- (void)testSelectedIndexBindingWithInsertsNullOption
|
||||
{
|
||||
var arrayController = [[CPArrayController alloc] init],
|
||||
testObject = [CPMutableDictionary dictionary],
|
||||
martin = @"Martin",
|
||||
malte = @"Malte",
|
||||
johan = @"Johan",
|
||||
menuObjects = [martin, malte, johan],
|
||||
insertsNullPlaceholderOption = [CPDictionary dictionaryWithObjects:[YES, @"Null Placeholder"] forKeys:[CPInsertsNullPlaceholderBindingOption, CPNullPlaceholderBindingOption]];
|
||||
|
||||
[arrayController setContent:menuObjects];
|
||||
[button bind:CPContentBinding toObject:arrayController withKeyPath:@"arrangedObjects" options:insertsNullPlaceholderOption];
|
||||
[button bind:CPSelectedIndexBinding toObject:testObject withKeyPath:@"index" options:nil];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Martin"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self]; // This has to be done to trigger the reverse set of the binding
|
||||
[self assert:0 equals:[testObject objectForKey:@"index"]];
|
||||
[[self button] selectItemWithTitle:@"Malte"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:1 equals:[testObject objectForKey:@"index"]];
|
||||
[[self button] selectItemWithTitle:@"Johan"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:2 equals:[testObject objectForKey:@"index"]];
|
||||
|
||||
[[self button] selectItemWithTitle:@"Null Placeholder"];
|
||||
[[self button] sendAction:@selector(actionTest:) to:self];
|
||||
[self assert:-1 equals:[testObject objectForKey:@"index"]];
|
||||
}
|
||||
|
||||
- (void)actionTest:(id)sender
|
||||
{
|
||||
}
|
||||
|
||||
- (void)testRemoveItemAtIndex_
|
||||
{
|
||||
button = [[CPPopUpButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 28.0) pullsDown:NO];
|
||||
@@ -231,5 +478,16 @@
|
||||
[self assert:1 equals:[button indexOfSelectedItem] message:"selection index reduced when a prior item is removed"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation ContentValuesTransformer : CPValueTransformer
|
||||
{
|
||||
}
|
||||
|
||||
- (id)transformedValue:(id)aValue
|
||||
{
|
||||
return "Transformed-" + aValue;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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)initialize
|
||||
{
|
||||
[CPValueTransformer setValueTransformer:[Transformer new] forName:@"Transformer"];
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
var array = [];
|
||||
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"John",@"name",@"Butcher",@"job",@"john@meat.com",@"email", 2, @"tag", @"Resources/Jakabos1.jpg", @"image"]];
|
||||
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"Alberto",@"name",@"Seller",@"job",@"alberto@gmail.com",@"email", 0, @"tag", @"Resources/Jakabos2.jpg", @"image"]];
|
||||
[array addObject:[CPDictionary dictionaryWithObjectsAndKeys:@"Barack",@"name",@"President",@"job",@"barack@whitehouse.gov",@"email", 1, @"tag", @"Resources/Jakabos4.jpg", @"image"]];
|
||||
|
||||
[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
|
||||
|
||||
@implementation Transformer : CPValueTransformer
|
||||
{
|
||||
}
|
||||
|
||||
- (id)transformedValue:(CPString)aValue
|
||||
{
|
||||
return "transformed " + aValue;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -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,7 @@
|
||||
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;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;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;72E;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;83E;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;84E;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;76E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;76E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;49E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;76E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;50E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;87E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;76E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;76E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;76E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$Line truncated
|
||||
KeyPath: arrangedObjects.selectionIndex
|
||||
ContentValues Transformer: TransformerS;22;{{852, 32}, {191, 24}}S;19;{{0, 0}, {191, 24}}S;12;popup-buttonS;8;borderedD;K;6;$classD;K;6;CP$UIDd;3;158E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;263E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;155E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;162E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;201E;E;d;2;-1S;22;{{423, 204}, {35, 24}}S;18;{{0, 0}, {35, 24}}d;2;36S;6;buttonS;17;selected+borderedd;1;1D;K;10;$classnameS;20;_CPCibCustomResourceK;8;$classesA;S;20;_CPCibCustomResourceS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;244E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;293E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;294E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;295E;E;S;15;Gradient Buttond;2;14S;22;{{389, 204}, {35, 24}}D;K;6;$classD;K;6;CP$UIDd;3;244E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;293E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;296E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;297E;E;S;23;{{852, 107}, {191, 24}}S;23;{{852, 184}, {191, 24}}S;22;{{551, 93}, {285, 51}}S;70;Binding: CPSelectedTagBinding
|
||||
KeyPath: selection.tag
|
||||
Transformer: NoneS;23;{{551, 161}, {285, 51}}S;73;Binding: CPSelectedValueBinding
|
||||
KeyPath: selection.name
|
||||
Transformer: NoneS;13;AppControllerS;12;CPDictionaryS;10;OtherViewsD;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;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;S;11;TransformerS;17;Arial, sans-serifD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;58E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;165E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;298E;E;S;21;{{0, 189}, {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;65E;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;299E;D;K;6;CP$UIDd;3;299E;D;K;6;CP$UIDd;3;299E;D;K;6;CP$UIDd;3;243E;E;E;S;22;{{467, 183}, {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;301E;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;278E;K;4;nameD;K;6;CP$UIDd;3;302E;K;12;defaultValueD;K;6;CP$UIDd;3;159E;K;6;valuesD;K;6;CP$UIDd;3;303E;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;280E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;304E;E;S;8;compare:D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;305E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;278E;K;4;nameD;K;6;CP$UIDd;3;302E;K;12;defaultValueD;K;6;CP$UIDd;3;159E;K;6;valuesD;K;6;CP$UIDd;3;306E;E;D;K;6;$classD;K;6;CP$UIDd;3;280E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;304E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;307E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;278E;K;4;nameD;K;6;CP$UIDd;3;302E;K;12;defaultValueD;K;6;CP$UIDd;3;159E;K;6;valuesD;K;6;CP$UIDd;3;308E;E;D;K;6;$classD;K;6;CP$UIDd;3;280E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;304E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;309E;E;E;S;3;TagD;K;6;$classD;K;6;CP$UIDd;3;278E;K;4;nameD;K;6;CP$UIDd;3;302E;K;12;defaultValueD;K;6;CP$UIDd;3;159E;K;6;valuesD;K;6;CP$UIDd;3;310E;E;D;K;6;$classD;K;6;CP$UIDd;3;280E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;304E;E;S;7;CPImageS;13;CPAddTemplateD;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;311E;E;E;S;16;CPRemoveTemplateD;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;312E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;243E;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;300E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;209E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;270E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;270E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;209E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;313E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;152E;E;S;4;fontD;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;236E;K;6;normalD;K;6;CP$UIDd;3;159E;E;E;S;39;{"top":0,"right":5,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;3;300E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;216E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;270E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;270E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;216E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;313E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;236E;K;6;normalD;K;6;CP$UIDd;3;159E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;300E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;220E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;270E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;270E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;220E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;313E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;236E;K;6;normalD;K;6;CP$UIDd;3;159E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;300E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;224E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;270E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;270E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;224E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;313E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;236E;K;6;normalD;K;6;CP$UIDd;3;159E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;280E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;314E;E;D;K;6;$classD;K;6;CP$UIDd;3;28Line 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>
|
||||
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user