Compare commits

...
Author SHA1 Message Date
Alexander LjungbergandStefan Eilers b6e77f4be3 Fixed: menus not closing on left click.
Previously, clicking outside a menu on a control would not close the menu. Also clicking on the menu header again would open a second menu.

This error was caused by the control receiving the click and starting its own tracking, depriving the menu of the mouse up event it was awaiting.

The behaviour to wait for the mouse up was wrong to begin with. Menus should close on mouse down.

This fix closes the menu on left mouse down anywhere but the menu, while still allowing the click to pass through to any control underneath the cursor.

Fixes #1833.
2013-03-14 13:23:22 +01:00
Alexander Ljungberg 81d0812172 Merge branch 'refs/heads/slevenbits-platform-resize-fix' into slevenbits 2013-03-11 17:49:38 +00:00
Alexander Ljungberg a426802b1a Merge branch 'master' into slevenbits 2013-02-24 17:54:41 +00:00
Alexander Ljungberg 64f85002b1 Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2013-02-19 23:18:01 +00:00
Alexander Ljungberg d4b7fd635d Merge branch 'refs/heads/master' into slevenbits 2013-02-19 23:16:56 +00:00
Ilya Kulakov cca8dd0056 Fix comment to -[CPCollectionView setItemPrototype:].
Item prototype is a subclass of CPViewController, not CPView.
2013-02-20 04:44:46 +07:00
Alexander Ljungberg d03ae79092 Merge branch 'refs/heads/master' into slevenbits 2013-02-19 10:49:39 +00:00
Alexander Ljungberg cd2b2a4d61 Merge branch 'refs/heads/master' into slevenbits 2013-02-06 16:37:49 +00:00
Alexander Ljungberg 0a8214b4cb Merge branch 'refs/heads/master' into slevenbits 2013-02-04 16:51:29 +00:00
Alexander Ljungberg 2be644d4b1 Merge branch 'refs/heads/master' into slevenbits 2013-02-02 11:15:29 +00:00
Alexander Ljungberg ce9531c80c Merge tag 'v0.9.6' into slevenbits 2013-01-21 12:43:45 +00:00
Alexander Ljungberg 6aa62762d6 Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2013-01-15 16:09:35 +00:00
Alexander Ljungberg 18bf69d2f3 Merge branch 'refs/heads/0.9.6' into slevenbits 2013-01-15 16:09:24 +00:00
Aparajita Fishman 541c351757 Merge branch 'refs/heads/upstream' 2013-01-12 14:46:34 +07:00
Aparajita Fishman 94ee1af33b Merge branch 'refs/heads/upstream' 2013-01-12 09:11:48 +07:00
Aparajita Fishman 7f8d58d457 Merge branch 'refs/heads/new-window-resize' 2013-01-05 11:17:02 +08:00
Alexander Ljungberg a391e2787b Merge branch 'new-window-resize' into slevenbits 2013-01-04 12:07:03 +00:00
Aparajita Fishman d9d9ea9804 Merge branch 'new-window-resize' 2013-01-04 15:22:01 +08:00
Alexander Ljungberg 261c0df2e7 Merge branch 'refs/heads/master' into slevenbits 2012-12-31 17:39:14 +00:00
Alexander Ljungberg 2fd6e7432a Merge branch 'refs/heads/window-resize' into slevenbits 2012-12-31 17:39:07 +00:00
Aparajita Fishman 0d674c3496 Finished full window resize support
- The main run loop resets the cursor if it falls outside of all windows during a mouse move.
- Added cursors supported by CSS that are not in NSCursor.
- Code cleanup in CPCursor.
- Cursors now indicate available resize directions if there is a window min/max size.
- Reduced slop to 3, what it is in Cocoa.
- Added a second non-min/max window to the demo.
2012-12-26 14:54:27 -08:00
Aparajita Fishman a15b24b9be Support for resizing windows on all sides 2012-12-24 08:53:18 -08:00
Alexander Ljungberg d0988fa5b0 Merge branch 'refs/heads/slevenbits-tokenfield-close-fix' into slevenbits 2012-12-21 17:07:39 +00:00
Alexander Ljungberg b7031f2f77 Unit test token field autocomplete window close. 2012-12-21 16:53:21 +00:00
Alexander Ljungberg 588da9addb Fixed: token field access of DOM in non-DOM apps.
Without this fix, the internal [tokenField _editorValue] would check the DOM input element even if !PLATFORM(DOM), which could potentially crash unit tests and future non DOM implementations.

The fix returns an empty string for non-DOM platforms.
2012-12-21 16:44:35 +00:00
Alexander Ljungberg 8f8f1a0224 Fixed: token field autocomplete menu remaining after window closed.
Without this change, closing the window containing a token field showing an autocomplete menu would result in a detached autocomplete menu hanging around.

This fix checks for window close notifications and makes sure to dismiss the menu if the window closes.
2012-12-21 15:00:20 +00:00
Alexander Ljungberg 90640b824c Merge branch 'refs/heads/slevenbits-tokenfield-value-fix' into slevenbits 2012-12-14 15:14:15 +00:00
Alexander Ljungberg 252144950a Merge branch 'refs/heads/slevenbits-popover-firefox-fix' into slevenbits 2012-12-13 14:09:18 +00:00
Alexander Ljungberg 17e49c458e Merge branch 'refs/heads/slevenbits-key-popover-fix' into slevenbits 2012-12-12 18:17:34 +00:00
Alexander Ljungberg 7fbe571e04 Merge remote-tracking branch 'slevenbits/slevenbits-tokenfield-scroll-fix' into slevenbits 2012-12-12 17:50:41 +00:00
Alexander Ljungberg b0051603da Merge remote-tracking branch 'slevenbits/slevenbits-editable-tokenfield-fix' into slevenbits 2012-12-12 17:50:33 +00:00
Alexander Ljungberg 1bed7e7108 Merge remote-tracking branch 'slevenbits/slevenbits-editable-tokenfield-fix' into slevenbits 2012-12-11 17:28:17 +00:00
Alexander Ljungberg 60fd129bd9 Merge remote-tracking branch 'slevenbits/slevenbits-settimeout-fix' into slevenbits 2012-12-11 13:05:43 +00:00
Alexander Ljungberg d4f9e7cba4 Merge branch 'master' into slevenbits 2012-11-30 00:07:07 +00:00
Alexander Ljungberg db1bf80cd4 Merge branch 'refs/heads/slevenbits-tabbing-fix' into slevenbits 2012-11-26 23:33:30 +00:00
Alexander Ljungberg 2ea24ed2dc Merge branch 'slevenbits-tokenfield-autocomplete-position' into slevenbits 2012-11-26 13:41:39 +00:00
Alexander Ljungberg abfb23d931 Merge branch 'refs/heads/slevenbits-tab-view-resize-fix' into slevenbits 2012-11-25 18:00:20 +00:00
Alexander Ljungberg 868480ada5 Merge branch 'refs/heads/master' into slevenbits 2012-11-25 17:59:48 +00:00
Alexander Ljungberg 8902acba04 Merge branch 'master' into slevenbits 2012-11-17 11:58:46 +00:00
Alexander Ljungberg 9b9380c18e Merge branch 'refs/heads/master' into slevenbits 2012-11-15 17:15:18 +00:00
Aparajita Fishman 3992ca71c6 Merge branch 'clickedColumn' 2012-10-02 17:20:53 -04:00
Aparajita Fishman 3a04bb2957 Merge branch 'refs/heads/upstream' 2012-09-29 05:28:41 -04:00
Aparajita Fishman 1c3300b066 Merge branch 'tag-fix' 2012-09-28 16:21:27 -04:00
Aparajita Fishman b443cb806a Both cells and controls can have tags in IB, control tag should take precedence 2012-09-28 16:13:24 -04:00
Alexander Ljungberg adbc420e0f Merge branch 'master' into slevenbits 2012-09-04 16:39:20 +01:00
Alexander Ljungberg e95648ca16 Merge branch 'master' into slevenbits 2012-09-03 20:20:52 +01:00
Alexander Ljungberg d0d66227cb Merge branch 'master' into slevenbits 2012-09-03 11:36:33 +01:00
Alexander Ljungberg 9d57d02eb5 Merge branch 'master' into slevenbits 2012-09-02 23:12:16 +01:00
Alexander Ljungberg bc93b3f6c7 Merge branch 'master' into slevenbits 2012-08-31 22:31:58 +01:00
Alexander Ljungberg 63b57b886e Merge branch 'master' into slevenbits 2012-08-31 22:12:16 +01:00
Alexander Ljungberg 10f6c8e8f6 Merge branch 'master' into slevenbits 2012-08-16 19:14:36 +01:00
Alexander Ljungberg 7b3136dae3 Merge branch 'master' into slevenbits 2012-08-15 18:32:36 +01:00
Alexander Ljungberg b7ee0fe44d Merge branch 'master' into slevenbits 2012-08-15 13:39:09 +01:00
Alexander Ljungberg 0150271e67 Merge branch 'master' into slevenbits 2012-08-15 02:09:40 +01:00
Alexander Ljungberg e23ba0852b Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-08-11 19:36:01 +01:00
Alexander Ljungberg 7cae90f8f9 Merge branch 'master' into slevenbits 2012-08-11 19:35:39 +01:00
Aparajita Fishman 9e1d09909e Merge branch 'stringValue-fix' 2012-08-09 20:31:37 -07:00
Alexander Ljungberg 306f2c987c Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-08-10 03:55:23 +01:00
Alexander Ljungberg 42200ce567 Merge branch 'master' into slevenbits 2012-08-10 03:55:03 +01:00
Aparajita Fishman 79cd71d2ab Merge branch 'fix-xcc-warnings' 2012-08-09 12:17:52 -07:00
Aparajita Fishman 081cf61e68 Merge branch 'refs/heads/upstream' 2012-08-09 11:27:32 -07:00
Alexander Ljungberg ed0fd87646 Merge branch 'master' into slevenbits 2012-08-07 12:32:47 +01:00
Alexander Ljungberg 4136953752 Merge branch 'refs/heads/master' into slevenbits 2012-08-06 14:03:37 +01:00
Alexander Ljungberg e70430057e Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-08-05 12:39:19 +01:00
Alexander Ljungberg 8498e28b70 Merge branch 'master' into slevenbits 2012-08-05 12:37:55 +01:00
Eric Wong 7ad24efe4f Merge branch 'cpdecimalnumber-fix' 2012-08-05 10:10:40 +08:00
Alexander Ljungberg a055d6d97e Merge branch 'refs/heads/master' into slevenbits 2012-08-04 14:11:25 +01:00
Alexander Ljungberg 23ed09a84e Merge branch 'refs/heads/master' into slevenbits 2012-08-02 15:54:36 +01:00
Aparajita Fishman 8e6119000d Added CPViewController -isViewLoaded, fixed CPWindowController -setViewController to use that
Before this fix, CPWindowController -setViewController was unconditionally loading the view, which should not happen.
2012-07-26 06:39:31 -07:00
Alexander Ljungberg 1db154ac5b Merge branch 'refs/heads/master' into slevenbits 2012-07-26 13:34:45 +01:00
Alexander Ljungberg 7ab833495f Merge branch 'refs/heads/master' into slevenbits 2012-07-23 15:39:03 +02:00
Alexander Ljungberg 60a33b9592 Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-07-19 01:07:29 +01:00
Alexander Ljungberg 7429687932 Merge branch 'master' into slevenbits 2012-07-19 01:06:41 +01:00
Aparajita Fishman fe04cfbe1f Merge branch 'refs/heads/upstream' 2012-07-18 14:48:56 -07:00
Alexander Ljungberg d57f5427fb Merge branch 'master' into slevenbits 2012-07-18 19:23:05 +01:00
Aparajita Fishman 6537a44c02 Merge branch 'refs/heads/upstream' 2012-07-18 09:53:32 -07:00
Aparajita Fishman f8cc2eb670 Merge branch 'refs/heads/upstream' 2012-07-17 15:12:50 -07:00
Alexander Ljungberg c83b4bf3af Merge branch 'master' into slevenbits 2012-07-17 23:02:17 +01:00
Alexander Ljungberg 5c5d2e47a9 Merge branch 'master' into slevenbits 2012-07-17 21:11:45 +01:00
Alexander Ljungberg 9e20f209bf Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-07-16 03:17:39 +01:00
Alexander Ljungberg ce5c6d9b96 Merge branch 'master' into slevenbits 2012-07-16 03:17:12 +01:00
Aparajita Fishman c166a20b89 Merge branch 'dictionary-key-methods' 2012-07-15 09:28:15 -07:00
Alexander Ljungberg 1cbf927684 Merge branch 'master' of github.com:slevenbits/cappuccino into slevenbits 2012-07-14 14:13:05 +01:00
Alexander Ljungberg 9fdfc4025a Merge branch 'refs/heads/master' into slevenbits 2012-07-14 14:12:53 +01:00
Aparajita Fishman 4958b4c47b Merge branch 'master' of github.com:slevenbits/cappuccino 2012-07-13 21:05:36 -07:00
Aparajita Fishman fedb24c2f3 Merge branch 'text-size-theming' 2012-07-13 21:02:46 -07:00
Aparajita Fishman e61a2a296e Merge branch 'master' of github.com:cappuccino/cappuccino 2012-07-13 21:00:35 -07:00
Alexander Ljungberg 0e87659093 Merge branch 'refs/heads/master' into slevenbits 2012-07-13 15:35:29 +01:00
Alexander Ljungberg eb990b6d4f Merge branch 'refs/heads/master' into slevenbits 2012-07-13 11:38:49 +01:00
Aparajita Fishman 12ea224f21 Merge branch 'master' of github.com:cappuccino/cappuccino 2012-07-12 17:21:40 -07:00
Aparajita Fishman 98260630ac Merge branch 'master' of github.com:cappuccino/cappuccino 2012-07-12 15:17:06 -07:00
Aparajita Fishman ba7fa38924 Merge branch 'master' of github.com:cappuccino/cappuccino 2012-07-12 07:15:19 -07:00
Aparajita Fishman 744bbd15d7 Merge branch 'master' of github.com:cappuccino/cappuccino 2012-07-11 09:24:35 -07:00
Aparajita Fishman 61f683b2e3 Merge branch 'text-clip-fix' 2012-07-11 09:11:04 -07:00
Aparajita Fishman 49521b44fb Merge branch 'system-font' 2012-07-10 18:54:42 -07:00
Aparajita Fishman f76404ef5e Merge branch 'refs/heads/system-font' 2012-07-10 16:41:06 -07:00
Aparajita Fishman 4df0b7c940 Merge branch 'archive-formatter' 2012-07-09 21:31:09 -07:00
Aparajita Fishman 6cd2c96152 Merge branch 'system-font' 2012-07-09 16:50:55 -07:00
Aparajita Fishman 106e21b79c Merge branch 'system-font' 2012-07-09 15:33:34 -07:00
Alexander Ljungberg 970dc912cb Merge branch 'master' into slevenbits 2012-07-09 20:32:07 +01:00
Alexander Ljungberg 6f84440bcd Merge branch 'master' into slevenbits 2012-07-08 21:29:08 +01:00
Alexander Ljungberg 4f69d82a4e Merge branch 'master' into slevenbits 2012-07-08 14:13:37 +01:00
Aparajita Fishman b85e44098b Merge branch 'CPComboBox' 2012-07-06 08:51:19 -07:00
9 changed files with 628 additions and 10 deletions
+4 -5
View File
@@ -177,20 +177,19 @@ var HORIZONTAL_MARGIN = 2;
Sets the item prototype to \c anItem
The item prototype should implement the CPCoding protocol
because the item is copied by archiving and unarchiving the
prototypal view.
because the item is copied by archiving and unarchiving.
Example:
<pre>
@implement MyCustomView : CPCollectionViewItem
@implement MyCustomViewItem : CPCollectionViewItem
{
CPArray items @accessors;
}
- (id)initWithFrame:(CGRect)aFrame
- (id)initWithCibName:(CPString)aCibNameOrNil bundle:(CPBundle)aCibBundleOrNil
{
self = [super initWithFrame:aFrame];
self = [super initWithCibName:aCibNameOrNil bundle:aCibBundleOrNil];
if (self)
{
items = [];
+32 -3
View File
@@ -132,6 +132,11 @@ var STICKY_TIME_INTERVAL = 0.4,
[self trackEvent:anEvent];
}
- (void)_trackAgain
{
[CPApp setTarget:self selector:@selector(trackEvent:) forNextEventMatchingMask:CPKeyDownMask | CPPeriodicMask | CPMouseMovedMask | CPLeftMouseDraggedMask | CPLeftMouseDownMask | CPLeftMouseUpMask | CPRightMouseUpMask | CPAppKitDefinedMask | CPScrollWheelMask untilDate:nil inMode:nil dequeue:YES];
}
- (void)trackEvent:(CPEvent)anEvent
{
var type = [anEvent type],
@@ -141,8 +146,6 @@ var STICKY_TIME_INTERVAL = 0.4,
if (type === CPAppKitDefined)
return [self completeTracking];
[CPApp setTarget:self selector:@selector(trackEvent:) forNextEventMatchingMask:CPKeyDownMask | CPPeriodicMask | CPMouseMovedMask | CPLeftMouseDraggedMask | CPLeftMouseUpMask | CPRightMouseUpMask | CPAppKitDefinedMask | CPScrollWheelMask untilDate:nil inMode:nil dequeue:YES];
if (type === CPKeyDown)
{
var menu = trackingMenu,
@@ -158,6 +161,7 @@ var STICKY_TIME_INTERVAL = 0.4,
if ([menu numberOfItems])
[self interpretKeyEvent:anEvent forMenu:menu];
[self _trackAgain];
return;
}
@@ -165,7 +169,10 @@ var STICKY_TIME_INTERVAL = 0.4,
var globalLocation = type === CPPeriodic ? _lastGlobalLocation : [anEvent globalLocation];
if (!globalLocation)
{
[self _trackAgain];
return;
}
// Find which menu window the mouse is currently on top of
var activeMenuContainer = [self menuContainerForPoint:globalLocation],
@@ -176,6 +183,28 @@ var STICKY_TIME_INTERVAL = 0.4,
activeItemIndex = activeMenuContainer ? [activeMenuContainer itemIndexAtPoint:menuLocation] : CPNotFound,
activeItem = activeItemIndex !== CPNotFound ? [activeMenu itemAtIndex:activeItemIndex] : nil;
// Click outside the menu structure?
if (type === CPLeftMouseDown && (!activeMenuContainer || !CGRectContainsPoint([activeMenuContainer globalFrame], globalLocation)))
{
[self completeTracking];
/*
You can close and interact with a control in a single click. E.g. you can have a menu open,
click on a button outside of it and have the menu immediately close and the button activate,
without having to click once to close the menu and once to activate the button.
Since we normally dequeue the event after tracking it, we'll have to put it back on the stack
in this special case. Note that it's important the event is executed /right now/, since certain
controls such as HTML upload buttons need a native click event at the top of the stack trace
to activate - it's not something we can fake later.
*/
[CPApp sendEvent:anEvent];
return;
}
[self _trackAgain];
if (_keyBuffer)
{
if (([anEvent timestamp] - _startTime) > (STICKY_TIME_INTERVAL + [activeMenu numberOfItems] / 2))
@@ -252,7 +281,7 @@ var STICKY_TIME_INTERVAL = 0.4,
_lastMouseOverMenuView = nil;
}
if (activeItemIndex != CPNotFound)
if (activeItemIndex !== CPNotFound)
[activeMenu _highlightItemAtIndex:activeItemIndex];
if (type === CPMouseMoved || type === CPLeftMouseDragged || type === CPLeftMouseDown || type === CPPeriodic)
+4
View File
@@ -693,7 +693,11 @@ CPTokenFieldDeleteButtonType = 1;
{
if (![self hasThemeState:CPThemeStateEditing])
return @"";
#if PLATFORM(DOM)
return [self _inputElement].value;
#else
return @"";
#endif
}
- (void)moveUp:(id)sender
+5
View File
@@ -672,6 +672,9 @@ var CPViewFlags = { },
if (_window === aWindow)
return;
// Unlike in Cocoa you can observe the window of a view.
[self willChangeValueForKey:@"window"];
[[self window] _dirtyKeyViewLoop];
// Clear out first responder if we're the first responder and leaving.
@@ -699,6 +702,8 @@ var CPViewFlags = { },
[self viewDidMoveToWindow];
[[self window] _dirtyKeyViewLoop];
[self didChangeValueForKey:@"window"];
}
/*!
+4
View File
@@ -790,6 +790,8 @@ CPTexturedBackgroundWindowMask
[_platformWindow orderFront:self];
[_platformWindow order:CPWindowAbove window:self relativeTo:nil];
#else
_isVisible = YES;
#endif
if (!CPApp._keyWindow)
@@ -854,6 +856,8 @@ CPTexturedBackgroundWindowMask
[_platformWindow orderOut:self];
[_platformWindow order:CPWindowOut window:self relativeTo:nil];
#else
_isVisible = NO;
#endif
[self _updateMainAndKeyWindows];
+23 -2
View File
@@ -42,6 +42,7 @@ var _CPAutocompleteMenuMaximumHeight = 307;
float widestItemWidth;
CPWindow _menuWindow;
CPWindow _parentWindow @accessors(property=parentWindow);
CPScrollView scrollView;
CPTableView tableView;
@@ -52,7 +53,8 @@ var _CPAutocompleteMenuMaximumHeight = 307;
{
if (self = [super init])
{
textField = aTextField;
[self bind:@"parentWindow" toObject:self withKeyPath:@"textField.window" options:nil];
[self setTextField:aTextField];
_menuWindow = [[_CPAutocompleteWindow alloc] initWithContentRect:CGRectMake(0, 0, 100, 100) styleMask:CPBorderlessWindowMask];
@@ -193,7 +195,7 @@ var _CPAutocompleteMenuMaximumHeight = 307;
{
var indexOfSelectedItem = [self indexOfSelectedItem];
[self setContentArray:[textField _completionsForSubstring:[textField _inputElement].value indexOfToken:0 indexOfSelectedItem:indexOfSelectedItem]];
[self setContentArray:[textField _completionsForSubstring:[textField _editorValue] indexOfToken:0 indexOfSelectedItem:indexOfSelectedItem]];
if (![contentArray count])
return;
@@ -266,6 +268,25 @@ var _CPAutocompleteMenuMaximumHeight = 307;
[textField _complete:self];
}
- (void)setParentWindow:(CPWindow)aWindow
{
if (aWindow === _parentWindow)
return;
if (_parentWindow)
[[CPNotificationCenter defaultCenter] removeObserver:self];
_parentWindow = aWindow;
if (_parentWindow)
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(parentWindowWillClose:) name:CPWindowWillCloseNotification object:_parentWindow];
}
- (void)parentWindowWillClose:(CPNotification)aNotification
{
[self _hideCompletions];
}
@end
@implementation _CPAutocompleteWindow : CPPanel
+49
View File
@@ -28,4 +28,53 @@
[[aWindow contentView] addSubview:tokenField];
}
- (void)testCloseParentWindow
{
var aWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0) styleMask:CPTitledWindowMask],
tokenField = [[CPTokenField alloc] initWithFrame:CGRectMake(10, 10, 100, 28)];
[[aWindow contentView] addSubview:tokenField];
[tokenField setEnabled:YES];
[tokenField setEditable:YES];
[aWindow makeKeyAndOrderFront:nil];
// Start autocomplete.
var tokenDelegate = [TokenFieldDelegate new];
[tokenDelegate setCompletions:[@"Tokyo", @"Toronto", @"Gothenburg", @"London"]];
[tokenField setDelegate:tokenDelegate];
[tokenField setStringValue:@"To"];
// Start autocomplete programmatically.
[aWindow makeFirstResponder:tokenField];
[[tokenField _autocompleteMenu] _showCompletions:nil];
// Verify we're now autocompleting.
[self assertTrue:[[tokenField _autocompleteMenu]._menuWindow isVisible] message:@"autocomplete visible"];
[aWindow close];
[self assertFalse:[[tokenField _autocompleteMenu]._menuWindow isVisible] message:@"autocomplete not visible when token field window closes"];
}
@end
@implementation TokenFieldDelegate : CPObject
{
CPArray completions @accessors;
}
- (CPArray)tokenField:(CPTokenField)aTokenField completionsForSubstring:(CPString)substring indexOfToken:(int)tokenIndex indexOfSelectedItem:(int)selectedIndex
{
var r = [];
if (!substring)
return completions;
for (var i = 0; i < completions.length; i++)
if (completions[i].toLowerCase().indexOf(completions.toLowerCase()) == 0)
r.push(completions[i]);
return r;
}
@end
@@ -0,0 +1,500 @@
<?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>archiveVersion</key>
<string>1</string>
<key>classes</key>
<dict/>
<key>objectVersion</key>
<string>46</string>
<key>objects</key>
<dict>
<key>0197449FA6E443D5612B531C</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.h</string>
<key>name</key>
<string>xcc_general_include.h</string>
<key>path</key>
<string>.XcodeSupport/xcc_general_include.h</string>
<key>sourceTree</key>
<string>SOURCE_ROOT</string>
</dict>
<key>0BB0415AA67E66C7AD861208</key>
<dict>
<key>children</key>
<array>
<string>0197449FA6E443D5612B531C</string>
<string>F0674822B1E1BF44B27C0CC0</string>
<string>36C04DDF9E4E475B27872362</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Classes</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>36C04DDF9E4E475B27872362</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.objc</string>
<key>name</key>
<string>_Users_aparajita_Scratch_capptest_resize_AppController.m</string>
<key>path</key>
<string>.XcodeSupport/_Users_aparajita_Scratch_capptest_resize_AppController.m</string>
<key>sourceTree</key>
<string>SOURCE_ROOT</string>
</dict>
<key>4D9740AEA74C136C23BB2343</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>?</string>
<key>name</key>
<string>AppController.j</string>
<key>path</key>
<string>AppController.j</string>
<key>sourceTree</key>
<string>SOURCE_ROOT</string>
</dict>
<key>9EEC4488135749D200615446</key>
<dict>
<key>children</key>
<array>
<string>9EEC44CB13574A0B00615446</string>
<string>9EEC4496135749D200615446</string>
<string>0BB0415AA67E66C7AD861208</string>
<string>E83A448CBC4FBC90C44ECAF8</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>9EEC448A135749D200615446</key>
<dict>
<key>attributes</key>
<dict>
<key>LastUpgradeCheck</key>
<string>0440</string>
<key>ORGANIZATIONNAME</key>
<string>280 North, Inc.</string>
</dict>
<key>buildConfigurationList</key>
<string>9EEC448D135749D200615446</string>
<key>compatibilityVersion</key>
<string>Xcode 3.2</string>
<key>developmentRegion</key>
<string>English</string>
<key>hasScannedForEncodings</key>
<string>0</string>
<key>isa</key>
<string>PBXProject</string>
<key>knownRegions</key>
<array>
<string>en</string>
</array>
<key>mainGroup</key>
<string>9EEC4488135749D200615446</string>
<key>productRefGroup</key>
<string>9EEC4494135749D200615446</string>
<key>projectDirPath</key>
<string></string>
<key>projectRoot</key>
<string></string>
<key>targets</key>
<array>
<string>9EEC4492135749D200615446</string>
</array>
</dict>
<key>9EEC448D135749D200615446</key>
<dict>
<key>buildConfigurations</key>
<array>
<string>9EEC44C3135749D300615446</string>
<string>9EEC44C4135749D300615446</string>
</array>
<key>defaultConfigurationIsVisible</key>
<string>0</string>
<key>defaultConfigurationName</key>
<string>Release</string>
<key>isa</key>
<string>XCConfigurationList</string>
</dict>
<key>9EEC448F135749D200615446</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>AE3D47C69A2FB91ADA520CAA</string>
</array>
<key>isa</key>
<string>PBXSourcesBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>9EEC4490135749D200615446</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>9EEC4498135749D200615446</string>
</array>
<key>isa</key>
<string>PBXFrameworksBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>9EEC4491135749D200615446</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array>
<string>9EEC44CC13574A0B00615446</string>
</array>
<key>isa</key>
<string>PBXResourcesBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
</dict>
<key>9EEC4492135749D200615446</key>
<dict>
<key>buildConfigurationList</key>
<string>9EEC44C5135749D300615446</string>
<key>buildPhases</key>
<array>
<string>9EEC448F135749D200615446</string>
<string>9EEC4490135749D200615446</string>
<string>9EEC4491135749D200615446</string>
</array>
<key>buildRules</key>
<array/>
<key>dependencies</key>
<array/>
<key>isa</key>
<string>PBXNativeTarget</string>
<key>name</key>
<string>Another</string>
<key>productName</key>
<string>Another</string>
<key>productReference</key>
<string>9EEC4493135749D200615446</string>
<key>productType</key>
<string>com.apple.product-type.application</string>
</dict>
<key>9EEC4493135749D200615446</key>
<dict>
<key>explicitFileType</key>
<string>wrapper.application</string>
<key>includeInIndex</key>
<string>0</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>path</key>
<string>Another.app</string>
<key>sourceTree</key>
<string>BUILT_PRODUCTS_DIR</string>
</dict>
<key>9EEC4494135749D200615446</key>
<dict>
<key>children</key>
<array>
<string>9EEC4493135749D200615446</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Products</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>9EEC4496135749D200615446</key>
<dict>
<key>children</key>
<array>
<string>9EEC4497135749D200615446</string>
<string>9EEC4499135749D300615446</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Frameworks</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>9EEC4497135749D200615446</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>Cocoa.framework</string>
<key>path</key>
<string>System/Library/Frameworks/Cocoa.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>9EEC4498135749D200615446</key>
<dict>
<key>fileRef</key>
<string>9EEC4497135749D200615446</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>9EEC4499135749D300615446</key>
<dict>
<key>children</key>
<array>
<string>9EEC449A135749D300615446</string>
<string>9EEC449B135749D300615446</string>
<string>9EEC449C135749D300615446</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Other Frameworks</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>9EEC449A135749D300615446</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>AppKit.framework</string>
<key>path</key>
<string>System/Library/Frameworks/AppKit.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>9EEC449B135749D300615446</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>CoreData.framework</string>
<key>path</key>
<string>System/Library/Frameworks/CoreData.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>9EEC449C135749D300615446</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>wrapper.framework</string>
<key>name</key>
<string>Foundation.framework</string>
<key>path</key>
<string>System/Library/Frameworks/Foundation.framework</string>
<key>sourceTree</key>
<string>SDKROOT</string>
</dict>
<key>9EEC44C3135749D300615446</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_32_64_BIT)</string>
<key>GCC_C_LANGUAGE_STANDARD</key>
<string>gnu99</string>
<key>GCC_OPTIMIZATION_LEVEL</key>
<string>0</string>
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
<string>DEBUG</string>
<key>GCC_SYMBOLS_PRIVATE_EXTERN</key>
<string>NO</string>
<key>GCC_VERSION</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>GCC_WARN_64_TO_32_BIT_CONVERSION</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_RETURN_TYPE</key>
<string>YES</string>
<key>GCC_WARN_UNUSED_VARIABLE</key>
<string>YES</string>
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>10.6</string>
<key>ONLY_ACTIVE_ARCH</key>
<string>YES</string>
<key>SDKROOT</key>
<string>macosx</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Debug</string>
</dict>
<key>9EEC44C4135749D300615446</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_32_64_BIT)</string>
<key>GCC_C_LANGUAGE_STANDARD</key>
<string>gnu99</string>
<key>GCC_VERSION</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>GCC_WARN_64_TO_32_BIT_CONVERSION</key>
<string>YES</string>
<key>GCC_WARN_ABOUT_RETURN_TYPE</key>
<string>YES</string>
<key>GCC_WARN_UNUSED_VARIABLE</key>
<string>YES</string>
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>10.6</string>
<key>SDKROOT</key>
<string>macosx</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Release</string>
</dict>
<key>9EEC44C5135749D300615446</key>
<dict>
<key>buildConfigurations</key>
<array>
<string>9EEC44C6135749D300615446</string>
<string>9EEC44C7135749D300615446</string>
</array>
<key>defaultConfigurationIsVisible</key>
<string>0</string>
<key>defaultConfigurationName</key>
<string>Release</string>
<key>isa</key>
<string>XCConfigurationList</string>
</dict>
<key>9EEC44C6135749D300615446</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ALWAYS_SEARCH_USER_PATHS</key>
<string>NO</string>
<key>COMBINE_HIDPI_IMAGES</key>
<string>YES</string>
<key>COPY_PHASE_STRIP</key>
<string>NO</string>
<key>GCC_DYNAMIC_NO_PIC</key>
<string>NO</string>
<key>GCC_ENABLE_OBJC_EXCEPTIONS</key>
<string>YES</string>
<key>GCC_PRECOMPILE_PREFIX_HEADER</key>
<string>YES</string>
<key>GCC_PREFIX_HEADER</key>
<string>Another/Another-Prefix.pch</string>
<key>INFOPLIST_FILE</key>
<string>Another/Another-Info.plist</string>
<key>PRODUCT_NAME</key>
<string>$(TARGET_NAME)</string>
<key>WRAPPER_EXTENSION</key>
<string>app</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Debug</string>
</dict>
<key>9EEC44C7135749D300615446</key>
<dict>
<key>buildSettings</key>
<dict>
<key>ALWAYS_SEARCH_USER_PATHS</key>
<string>NO</string>
<key>COMBINE_HIDPI_IMAGES</key>
<string>YES</string>
<key>COPY_PHASE_STRIP</key>
<string>YES</string>
<key>DEBUG_INFORMATION_FORMAT</key>
<string>dwarf-with-dsym</string>
<key>GCC_ENABLE_OBJC_EXCEPTIONS</key>
<string>YES</string>
<key>GCC_PRECOMPILE_PREFIX_HEADER</key>
<string>YES</string>
<key>GCC_PREFIX_HEADER</key>
<string>Another/Another-Prefix.pch</string>
<key>INFOPLIST_FILE</key>
<string>Another/Another-Info.plist</string>
<key>PRODUCT_NAME</key>
<string>$(TARGET_NAME)</string>
<key>WRAPPER_EXTENSION</key>
<string>app</string>
</dict>
<key>isa</key>
<string>XCBuildConfiguration</string>
<key>name</key>
<string>Release</string>
</dict>
<key>9EEC44CB13574A0B00615446</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>folder</string>
<key>name</key>
<string>CappuccinoResources</string>
<key>path</key>
<string>Resources</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>9EEC44CC13574A0B00615446</key>
<dict>
<key>fileRef</key>
<string>9EEC44CB13574A0B00615446</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>AE3D47C69A2FB91ADA520CAA</key>
<dict>
<key>fileRef</key>
<string>36C04DDF9E4E475B27872362</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>E83A448CBC4FBC90C44ECAF8</key>
<dict>
<key>children</key>
<array>
<string>4D9740AEA74C136C23BB2343</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
<key>name</key>
<string>Sources</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>F0674822B1E1BF44B27C0CC0</key>
<dict>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.h</string>
<key>name</key>
<string>_Users_aparajita_Scratch_capptest_resize_AppController.h</string>
<key>path</key>
<string>.XcodeSupport/_Users_aparajita_Scratch_capptest_resize_AppController.h</string>
<key>sourceTree</key>
<string>SOURCE_ROOT</string>
</dict>
</dict>
<key>rootObject</key>
<string>9EEC448A135749D200615446</string>
</dict>
</plist>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:resize.xcodeproj">
</FileRef>
</Workspace>