Commit Graph
2564 Commits
Author SHA1 Message Date
Alexander Ljungberg 9f459f053e Fixed: several CPArrayController methods returned undefined instead of booleans. 2011-09-07 18:17:35 +01:00
Alexander Ljungberg 4926824482 Fixed: CPArrayController setSelectionIndexes: sometimes modified its input.
Also very slightly improved performance as sometimes the input index set would be instantiated internally and then needlessly copied.
2011-09-07 17:53:48 +01:00
Alexander Ljungberg cb2f539cf7 Send didChange in reverse order of willChange in CPObjectController setContent:. 2011-09-07 17:32:19 +01:00
Antoine Mercadal 28772d3254 use CPWindow's title for platform window 2011-08-31 19:17:10 +02:00
Antoine Mercadal d1f5c1eebc patch for enventual webkit bug with window.open() 2011-08-31 18:28:47 +02:00
Antoine Mercadal a2b6585c0d CPSound support play while loading
This patch allow to send 'play' message before
the sound is actually loaded (by remembering the play request
and playing the sound when loaded if needed)

this allow to do:

```objj
var sound = [[CPSound alloc] initWithContentsOfURL:aSoundURL byReference:NO];
[sound play];
```
2011-08-20 18:48:11 +02:00
Randy Luecke 2462cd7b1d Merge pull request #1316 from primalmotion/cppopover
add CPPopover (Cocoa API compliant)
2011-08-17 11:17:02 -07:00
Randy Luecke 331e338c06 Merge pull request #1333 from eventualbuddha/CPAlert-subclass-builder-support
Allow CPAlert subclasses to use +alertWithMessageText:... et al.
2011-08-17 11:16:20 -07:00
Randy Luecke 2b68f40872 Merge pull request #1341 from cacaodev/CPTableView_drawBackgroundInClipRect
CPTableView: -drawBackroundInClipRect: bug
2011-08-17 11:15:33 -07:00
Randy Luecke 2f7b3c306d Merge pull request #1335 from alexmipego/master
CPBox autoresize settings
2011-08-17 11:13:46 -07:00
Alexander Ljungberg f773bd217c Fixed with token field: remove false ivar '_tokenIndex' and fix tokenField:tokenField completionsForSubstring:indexOfToken:indexOfSelectedItem: ignoring its indexOfToken: parameter. 2011-08-12 19:46:39 -04:00
Alexander Ljungberg a5f0f0e3db CPTokenField archiving support. 2011-08-12 19:29:59 -04:00
cacaodev 9f06ed725e CPTableView: -drawBackroundInClipRect:
Fixes a bug where we were drawing rows from 0 instead of the first exposed when usesAlternatingBackgroundColors:YES
2011-08-11 21:06:19 +02:00
alexmipego e32515e5cc Make boxEnclosingView: copy the auto resizing settings of the view 2011-08-07 20:22:14 +01:00
Brian Donovan 156610ee07 Allow CPAlert subclasses to use +alertWithMessageText:... et al. 2011-08-05 08:32:44 -07:00
Alexander Ljungberg fcaf672bf8 Merge branch 'master' of github.com:280north/cappuccino 2011-07-29 02:43:52 -04:00
Alexander Ljungberg dd5d8fcdce Closes #1305. Fixed: don't constrain max toolbar item width to the width of the label. 2011-07-29 02:42:42 -04:00
Klaas Pieter Annema f241142216 don't disallow setEnabled for auto enabled items 2011-07-21 14:41:47 +02:00
Klaas Pieter Annema f0561844d8 don't close a menu item with a submenu
A submenu item should only close the menu if it has a non default action.
This is compliant with how Cocoa behavior.
2011-07-21 12:23:11 +02:00
Alexander Ljungberg 70f8e3a832 Merge pull request #1278 from aparajita/cappuccino
---

 I discovered the following behavior that is not in conformance with Cocoa:

- Backspace, tab, escape, and space are considered key equivalents.
- Function keys (F1 - FNN) are not considered key equivalents.
- CPTextField executes `performKeyEquivalent` twice if a field is first responder.

Build this Cocoa project and debug it: http://d.pr/Xc3h

Take a look at the debug log while typing some keys. You will see that backspace, tab, escape and space do not trigger `performKeyEquivalent`, and that `performKeyEquivalent` is only executed once for the first responder.

Then run the performKeyEquivalentsTest app in this commit and look at the console log while trying keys in the text fields. If you turn the old code on, you will see how `performKeyEquivalent` is executed twice for the first responder.

For reference on key handling code, I consulted this:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html%23//apple_ref/doc/uid/10000060i-CH3-SW11
2011-07-17 22:55:18 -04:00
Alexander Ljungberg 59b302acde Merge pull request #1177 from cacaodev/cappuccino
---

Adds -scrollViewWillScroll: and -scrollviewDidScroll: delegate methods to CPScrollView.

These methods are not in AppKit but exist in UIKit. Useful for lazy loading data in a view, for example a CPTableview.
Tested in the CPScrollView example.

Conflicts:
	AppKit/CPScrollView.j
2011-07-17 22:05:55 -04:00
Alexander Ljungberg f54f8dfec9 Merge branch 'master' of github.com:280north/cappuccino 2011-07-17 21:48:53 -04:00
Randy Luecke ec83977fe1 Merge pull request #1312 from aparajita/CPPlatformString-missing-methods
Make sure CPPlatformString +sizeOfString and +metricsOfFont work with CommonJS
2011-07-16 19:33:32 -07:00
Randy Luecke 1eb6319b49 Merge pull request #1313 from cacaodev/CPViewAnimation
CPViewAnimation: current frame based on -currentValue.
2011-07-16 19:30:25 -07:00
Mike Fellows 8f7e06f9d6 Fix regression to CPTextField's insertNewline, duplicate target actions were being called when an edit on a textfield was ended with an enter/return keypress 2011-07-15 18:55:03 -07:00
Klaas Pieter Annema edcee8934d fix empty contextual menus out of bounds error 2011-07-14 16:26:58 +02:00
Klaas Pieter Annema d115d2ef47 fix context menu only closes after two clicks
This is a regression from 73b4c33f05.
Because we were only tracking wether the left mouse button went up after a contextual menu (which is opened with the right mouse)
would only close after the second left mouse up.
2011-07-14 11:15:34 +02:00
Aparajita Fishman 918f6fbb8f CPFormatter support, bug fixes...
- Test application.

CPControl
---------
- Moved _formatter declaration up next to value, it was in the Target-Action Support section before.

- sendAction:to: should return a BOOL.

- Support for CPFormatter -editingStringForObjectValue.

- If a nil string is passed to -setStringValue in Cocoa, it raises an invalid parameter assertion and does nothing.

- Per Cocoa, if setting a string value fails, it tries again with an empty string.

- Removed a few extra blank lines.

- Changed NULL to nil.

CPTextField
-----------
- The string value is now cached in _stringValue to avoid constant calls to the formatter.

- There were several places where references to _inputElement were not wrapped with #if PLATFORM(DOM).

- When resigning first responder, if there is a formatter and formatting fails, reject the resignation and keep focus. Also, if the delegate responds to control:didFailToFormatString:errorDescription:, invoke it.

- _willBecomeFirstResponderByClick was not being set to NO when resigning. As a result, if you clicked in a field, tabbed to another field, and tabbed back to the original field, it would not select the text because it thought there was a mouse click.

- Don't send _sendStringValue: in keyUp: if the value has not changed. Previously it would do that for non-printing keys like navigation keys.

- insertNewLine: validates the string the same way resigning does.

- insertNewLine: would not send textDidEndEditing: if the field had no action, but it should.

- insertNewLine: should select all text (per Cocoa).

- insertNewLineIgnoringFieldEditor: and insertTabIgnoringFieldEditor: were not replacing the selection, Cocoa docs say they should.

- Per Cocoa, when setting an object value and there is a formatter, the value is first formatted as a string. If that fails, an object value for an empty string is attempted.

CPFormatter
-----------
- Fixed up the docs to match the method signatures.

- Indicated with "Ref" in argument types if the argument is pass by reference.

- isPartialStringValid:newEditingString:errorDescription: has a default implementation in Cocoa that nils the return values and returns YES.

- Fixed the name of isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:

- isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: has a default implementation in Cocoa that invokes isPartialStringValid:newEditingString:errorDescription:
2011-07-09 17:05:23 -07:00
Antoine Mercadal 916b9a399b make color matching Aristo 2.0 ones 2011-07-09 15:29:13 +02:00
Antoine Mercadal 3d62791477 fix animation lack in FF prevents Popover to close 2011-07-09 11:50:52 +02:00
Antoine Mercadal 0246d501e2 full support for CPPopover and nib2cib + enchanced delegates 2011-07-08 17:49:53 +02:00
Antoine Mercadal 3d5b30ab9e add CPPopover (Cocoa API compliant) 2011-07-08 15:50:29 +02:00
Klaas Pieter Annema 4719578f10 fix 0 is a valid highlighted index 2011-07-07 20:40:22 +02:00
Klaas Pieter Annema 63d208bf20 never return a separator as the highlighted item 2011-07-07 18:33:00 +02:00
Alexander LjungbergandKlaas Pieter Annema 3db61216e1 CPFormatter support for CPControl which actually works. 2011-07-07 16:04:11 +02:00
Alexander LjungbergandKlaas Pieter Annema 63b00186f4 Fixed: level indicator warning and critical level ranges should be inclusive. 2011-07-07 16:04:11 +02:00
Alexander LjungbergandKlaas Pieter Annema 110d4c478d Fixed: pressing the up arrow key in a table view would cause a crash if the previous selection was non continuous. 2011-07-07 16:04:11 +02:00
Alexander LjungbergandKlaas Pieter Annema 06670f2214 CPFormatter support for CPControl. 2011-07-07 16:04:11 +02:00
Klaas Pieter Annema 73b4c33f05 track if the mouse was released after menu open
Make sure the menu isn't closed by the mouse up that is directly followed by the mouse down that opened the menu.
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema ad30f4dcbb call delegate when submenu open and close 2011-07-07 16:04:10 +02:00
Klaas Pieter Annema 0318587f80 Set the title of a menu item's submenu
Correspond to Cocoa's behavior by automatically having CPMenuItem set the title of it's submenu
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema 2b6fddf26c move menu delegate logic to generic methods 2011-07-07 16:04:04 +02:00
Klaas Pieter Annema 0af89853d4 Merge pull request #1311 from aparajita/registerThemeValues-tweak
Added missing type in +registerThemeValues signature
2011-07-01 08:41:29 -07:00
Randall Luecke ff13de9f75 Merge branch 'master' of git://github.com/280north/cappuccino 2011-07-01 00:05:19 -07:00
Randall Luecke 47f40eb04b Added left/right arrow key expand and collapse... just for you @tolmasky. 2011-07-01 00:04:09 -07:00
Aparajita Fishman 1ffc7ed6fb Make sure CPPlatformString +sizeOfString and +metricsOfFont work with CommonJS, so that OJUnitTest will work. 2011-06-29 10:52:22 -07:00
Aparajita Fishman 63710d5fae Added missing type in method signature 2011-06-29 09:08:12 -07:00
Klaas Pieter Annema a2ef701d18 Merge branch 'master' of github.com:280north/cappuccino 2011-06-29 16:05:26 +02:00
Klaas Pieter Annema 55e07536d9 don't start dragging if there are no rows 2011-06-29 16:04:46 +02:00
Randall Luecke fc81483371 Fix typeo in CPToolbar.j CPToolbarItems to not respect maxSize. Closes #1305. 2011-06-25 00:45:07 -07:00