Commit Graph
10331 Commits
Author SHA1 Message Date
aparajita c7f4517490 Merge pull request #1881 from kerusan/cpruleeditor_post_row_change
Fixed: 'RowCountChanged' notification generates nil warning when dragging a row
2013-04-18 13:26:20 -07:00
aparajita 8f6efdaae0 Merge pull request #1902 from ahankinson/fix-issue1899
Fixed: Removing an item from a menu also removes its highlight state
2013-04-18 13:17:24 -07:00
aparajita e760ee39e5 Merge pull request #1906 from ahankinson/fix-cptableview-variabletypo
Fixed: Misspelled variable in CPTableView
2013-04-18 13:02:32 -07:00
aparajita 0bc95c069d Merge pull request #1818 from t00f/master
New: tableView:shouldReorderColumn:toColumn: CPTableView delegate method
2013-04-18 12:58:38 -07:00
Aparajita Fishman f883b6a182 Fixed: _CPPopoverWindow.j was not imported in CPApplication.j
This caused the isKindOfClass: test in _CPRunModalLoop to generate an error in a deployment.

Importing that file fixed the error.
2013-04-18 13:31:27 -04:00
Christophe Serafin 88a247c107 merged sources and show shouldReorderColumn usage in TableCibTest example 2013-04-17 01:57:07 +02:00
Alexandre Wilhelm de5fbd921e Fixed bug when changing timeZone of the CPDatePicker 2013-04-16 15:22:16 -07:00
Alexandre Wilhelm a8aeb8addb Added CPTimeZone test 2013-04-16 15:21:30 -07:00
Alexandre Wilhelm 13211b489d Added support for timeZone in CPDatePicker calendar 2013-04-16 14:20:18 -07:00
Alexandre Wilhelm 9f5e977bcd Added support for timeZone in CPDatePicker textual 2013-04-16 14:10:52 -07:00
Alexandre Wilhelm 28357bd57f Corrected bad test 2013-04-16 02:26:17 +02:00
Alexandre Wilhelm f39e224c48 Updated manual example 2013-04-15 16:33:00 -07:00
Alexandre Wilhelm 9b9b041263 Removed double action in CPDatePicker 2013-04-15 16:22:54 -07:00
Alexandre Wilhelm 98a59c4700 Fixed small bus about timeZone 2013-04-15 16:20:02 -07:00
Alexandre Wilhelm 3497e36f23 Fixed bunch of bugs in CPDateFormatter with TimeZone 2013-04-15 14:25:30 -07:00
Andrew Hankinson 3612565e3a Fix delegate selection to check the index first
In the previous patch the shouldSelectRow delegate was being stored and only called once. This changes its behaviour again to first fire the delegate to see if the row in question can be selected. If not, it will look for the next row (up or down) that may be selected and choose that one.
2013-04-15 16:38:37 -04:00
Andrew Hankinson c24a7712cd Fixed: Misspelled variable in CPTableView
This commit fixes a typo in CPTableView. `_contentBindingExpicitelySet` should be `_contentBindingExplicitlySet`. The misspelling was consistent, so this should have no functional change.
2013-04-15 11:58:13 -04:00
Alexander Ljungberg 83677dae83 Merge pull request #1904 from ahankinson/docs-fix-tableview-typo
Docs: Fix small but potentially confusing typo in CPTableView
2013-04-15 16:48:27 +01:00
Andrew Hankinson 6e2dcd5dcb Fixed: Delegate method fires twice when using keyboard to select rows in table view
Previously, navigating through the rows of a tableview with the arrow keys would cause the delegate method `- (BOOL)tableView:(CPTableView)aTableView shouldSelectRow:(int)rowIndex` to fire twice. This was due to the delegate method being called twice in checking whether the row could be selected.

This commit changes it so that the delegate method is called just once and the result stored.
2013-04-15 11:46:58 -04:00
Andrew Hankinson 5eea9c301c Docs: Fix small but potentially confusing typo in CPTableView
This commit fixes the delegate documentation for `- (void)tableViewSelectionIsChanging:(CPNotification)aNotification`, removing reference to "selection chaining." (should be "selection changing")
2013-04-15 11:21:29 -04:00
Andrew Hankinson efa2918ce9 Change how menu items are highlighted
This replaces the previous solution with one proposed by @BlairDuncan. It uses the _highlightItemAtIndex: method to maintain the highlight state, rather than setting the _highlightIndex variable directly.
2013-04-14 15:40:35 -04:00
cacaodev e53337bcdc Remove check in -hitTest: that was preventing reverse set binding 2013-04-13 21:39:20 +02:00
cacaodev e5d883f97e CAKeyframeAnimation
CPAnimatablePropertyContainer protocol (CPView)
CPAnimationContext
_CPObjectAnimator CPViewAnimator
CSS Animations wrapper

CPAnimatablePropertyContainerTest : animations of views with custom Layout / Regular Layout / Custom DrawRect: / No DrawRect: / Subviews / No Subviews and combinations of these situations.
controls animation (text field, button, popup, slider ...). They animate their size via their action.
2013-04-13 16:29:43 +02:00
cacaodev 548a55792c Merge remote-tracking branch 'upstream/master' into CPTableView-enumerateRows 2013-04-13 11:52:51 +02:00
cacaodev 43f0f2a0fd Simplified -numberOfRows
Added -_numberOfRows that computes the new number of rows. Removed the
nil check.

All tests in AppKit/CPTableViewTest are now passing with success.
2013-04-13 11:38:47 +02:00
Alexandre Wilhelm 0bbaec0829 New: Added support for CPTimeZone and CPDateFormatter
- Added support for CPDateFormatter in Foundation
- Added support for CPTimeZone in Foundation
- Added support fo CPDateFormatter in nib2cib

Test app in Tests/Manual/CPDateFormatter
UnitTest in Tests/Foundation/CPTimeZoneTest.j
UnitTest in Tests/Foundation/CPDateFormatterTest.j
2013-04-12 11:15:10 -07:00
cacaodev 7b1c696810 Fixed: CPTableViewTest: -deselectAll should send 1 CPtableViewSelectionDidChangeNotification, not 2.
Checked in cocoa.
Moved a failing test to the end of the method so it does not shadow other tests.
2013-04-12 19:48:07 +02:00
cacaodev 8d69c3764d Fixed: The data views were not loaded immediately
When reloading the table view, the actual loading (-load) is defered
until layout is needed (generally in the next run loop). This is an
advantage because it minimize reloads but in some case it is necessary
to force a reload, for example when we need to access data views, or
manually edit a view, or when we explicitely ask for a reload.
This commit adds _reloadDataViewsImmediately and make use of it when
necessary.

Tests: AppKit/CPTableViewTest -> -testEditCell
2013-04-12 19:35:03 +02:00
cacaodev 87acd9d7ee Fixed: in some circumstances, table views binded with the content binding were not correctly reloading the data.
Test: AppKit/WithOrWithoutbinding
2013-04-12 19:23:51 +02:00
cacaodev 06391c9de6 Fixed: data views were not reloaded after a CPTableColumn setDataView:
Cell-based table views with no identifier set for the table column:
Before this commit, the caching system was asking for a view identified
by the tableColumn UID. If the table column data view was changed
externaly, the previoulsy cached data views were loaded instead of the
new ones. The views are now identified by the -dataview UID.

Test: AppKit/TableTest -testLayout were a custom data view is set.
2013-04-12 19:21:16 +02:00
cacaodev b42b41216b Remove old code. Adds Equality check in -setDataView: 2013-04-12 19:08:27 +02:00
Martin Carlberg 689ab09555 New: Now supports 'defined' operator, which lets you check whether macros are defined in the middle of an ‘#if’.
Also the evaluation of expressions are now lazy.
2013-04-11 09:37:40 +02:00
Martin Carlberg 30ee1ad8cd New: Handles line continue token '\' on lines starting with '#'
We now support lines like this:
#define StopButtonTitle() \
        CPLocalizedString(@"Stop", @"Stop button title")
2013-04-11 09:32:41 +02:00
Andrew Hankinson cc9ff15142 Fixed: Removing an item from a menu also removes its highlight state
Previously when a menu item was instantiated outside of the context of the menu itself, its highlight state was maintained even after it was removed from the menu. If the menu was dismissed with the item highlighted, and then the item was used in another menu (e.g., re-added to a context menu for a table row) it would appear highlighted, even though the menu highlight index was not set.

This commit ensures that when removing items from a menu that the highlight state of the underlying view is set to NO as well.

Tests for this behaviour are included as well.

Fixes #1899
2013-04-10 00:04:53 -04:00
Alexander Ljungberg 4c756c7cbf Merge pull request #1900 from ahankinson/fix-aboutpanel-cib
Fixed: AboutPanel is now constructed in code, rather than in a CIB
2013-04-09 00:26:16 +01:00
Andrew Hankinson 100f1b0b41 Fixed: AboutPanel is now constructed in code, rather than in a CIB
Previously the default About panel was constructed in a CIB. Additionally, an Xcode-based XIB/CIB file was constructed to replace it.

This commit creates the default About panel in code and removes the additional CIB/XIB files in the AppKit/Resources panel.
2013-04-08 19:20:37 -04:00
Aparajita Fishman d9117bd9a0 Fixed: Converter was copying too much state from Nib2Cib, framework resources could not be referenced in Xcode.
* State *
Previously the Converter class needlessly copied a whole bunch of state from the Nib2Cib class, which was not only poor factoring, but made for easy omissions of state when instantiating a new Converter, such as was done in NSNib.j.

This commit pushes all state not specific to Converter up to Nib2Cib. This allowed removal of redundant code in NSNib -NS_initWithCoder.

* Resources *
Previously it was not possible to use custom images that were located in a framework, because only the app's Resources directory was searched.

This commit automatically searches all frameworks for Resources directories. When a custom image is specified in Xcode, first the app's Resources directory is searched, then all framework Resource directories. Alternately, the specific framework to use can be specified in Xcode by using the form framework@image.

At runtime, the framework is loaded by its identifier (as specified in Info.plist), and if there is no identifier, by searching next to the current AppKit framework.

All of this renders the nib2cib -R option completely obsolete, so it was removed from the NibApplication/Jakefile template.
2013-04-08 15:48:45 -04:00
Andrew Hankinson 6ef5b46dd6 Fixed: CPTokenField sends focus and blur notifications
This commit adds notifications for focus and blur on CPTokenField.

Attached is a modified Manual CPTokenFieldTest that observes these notifications.

Fixes #1396
2013-04-07 20:50:50 -04:00
Alexander Ljungberg b3c60e56a6 Merge pull request #1897 from ahankinson/fix-info-plist-templates
Fixed: Additional keys in default Info.plist templates
2013-04-08 00:35:42 +01:00
Alexander Ljungberg 8d345701da Merge pull request #1896 from ahankinson/fix-about-panel-xib
Fixed: New AboutPanel.xib replaces older CIB file
2013-04-07 23:18:48 +01:00
Alexander Ljungberg 016ed4f6ee Merge branch 'master' of github.com:cappuccino/cappuccino 2013-04-07 23:16:45 +01:00
Andrew Hankinson 3da7e45244 Fixed: Additional keys in default Info.plist templates
This fix adds two keys to the default Info.plist in the capp gen template for NibApplication, "CPBundleVersion" and "CPHumanReadableCopyright". These are introduced primarily to fill out the fields in the default "About" panel. (see #1896)
2013-04-07 17:02:54 -04:00
Andrew Hankinson b1229bce1d Fixed: New AboutPanel.xib replaces older CIB file
With the death of Atlas CIB files can no longer be edited directly. This commit replaces a CIB-only version of "AppKit/Resources/AboutPanel.cib" with a XIB-derived one that can be edited in Xcode.

This commit also moves some of the formatting of the about panel into the IB file (c.f. the FIXME note).
2013-04-07 16:54:15 -04:00
Aparajita Fishman fea6b37379 New: capp framework template provides a default CPPrincipalClass.
Previously no default principal class was declared in Info.plist for a framework.

This commit declares the principal class to be the same as the main framework class created with capp gen -t Framework.
2013-04-06 16:21:47 -04:00
Aparajita Fishman d64ea284fb Fixed: CPBundle -bundleWithIdentifier did not create CPBundle when necessary.
Previously, if a CFBundle with the given identifier had been loaded, but no CPBundle had yet been created with the given identifier, -bundleWithIdentifier would return nil instead of a newly constructed CPBundle with the CFBundle's URL.

This commit correctly returns a newly constructed CPBundle when a CFBundle is found.
2013-04-06 16:20:21 -04:00
Aparajita Fishman cc2503ac0f Fixed: CFBundle.prototype.bundleURL() did not return an absolute URL.
CFBundle internally stores its URL in relative form, and returned that relative URL in the bundleURL() function. However, in Cocoa an absolute URL is returned. It is reasonable to assume an absolute URL would be expected by some asking for the bundle's URL. Even within CFBundle, most times bundleURL() is called it is followed with absoluteURL().

This commit returns an absolute URL from bundleURL().
2013-04-06 15:51:09 -04:00
Aparajita Fishman 486bff44df Fixed: wrong display name for CFBundle.bundleContainingURL. 2013-04-06 15:48:41 -04:00
Aparajita Fishman 04d6b34bfe Fixed: tests broke because of change in CGRect/CGSize/CGPoint description. 2013-04-06 08:49:33 -04:00
Aparajita Fishman 0193632673 New: use a more compact representation of CGSize/CGPoint/CGRect in description. 2013-04-05 23:18:56 -04:00
Aparajita Fishman a3730812bc New: CFBundle.identifier, CFBundle.bundleWithIdentifier, CPBundle -bundleWithIdentifier.
Finding a bundle by identifier is theoretically better than using a class.
2013-04-05 23:16:05 -04:00