Commit Graph
7256 Commits
Author SHA1 Message Date
Martin Carlberg ffdee8c3d7 Fixed: Method isEqual: can handle nil as an argument for CPExpression and CPPredicate including sub classes. 2013-04-23 12:58:07 +02:00
Martin Carlberg 8a94c33a64 New: Added test cases checking that a CPObject, CPExpression and CPPredicate is not equal nil.
CPExpression and CPPredicate can't handle nil as an argument to method isEqual:. These test cases checks that this is working.
2013-04-23 12:54:26 +02:00
Alexander Ljungberg 6048814635 Merge branch 'refs/heads/slevenbits-cpcolor-hsb-fix' 2013-04-21 15:03:53 +01:00
Alexander Ljungberg fe26e6cfe0 New: + CPException raise:format:.
This method allows the exception reason to be a formatted string with parameter replacement.
2013-04-21 14:56:57 +01:00
Alexander Ljungberg 3e35e3d8a8 Fixed: CPColorPicker not working with fixed CPColor colorWithHue: implementation. 2013-04-21 14:32:10 +01:00
Alexander Ljungberg 70b5105daa Fixed: CPColor colorWithHue:saturation:brightness: returning undefined.
A hue of 1.0 would cause the CPColor colorWithHue:saturation:brightness: method to return `undefined` instead of a CPColor instance.
2013-04-21 14:22:34 +01:00
Alexander Ljungberg d00846aae7 Fixed: CPColor colorWithHue:saturation:brightness: parameters not clamped.
Previously, the parameters to CPColor colorWithHue:saturation:brightness: could be specified below 0 or above 1.0.

Now the values are clamped so that values below 0 are taken as 0 and values above 1.0 and taken as 1.0.
2013-04-21 14:21:47 +01:00
Aparajita Fishman 7ec660c509 New: record the source filename in SyntaxError. 2013-04-20 13:24:50 -04:00
Alexander Ljungberg 0c2abf3629 Test: new CPColor HSB tests. 2013-04-20 13:56:49 +01:00
Alexander Ljungberg 95d4bef3ea New: - CPColor hueComponent, saturationComponent and brightnessComponent. 2013-04-20 13:42:05 +01:00
Alexander Ljungberg 4e1a1415f6 Fixed: - CPColor hsbComponents range.
Previously, - CPColor hsbComponents returned degrees and percents. With the latest change to - CPColor colorWithHue:saturation:brightness: this was inconsistent.

Now - CPColor hsbComponents returns its components as factors in the 0-1.0 range.
2013-04-20 13:41:16 +01:00
Alexander Ljungberg 40579b5d56 Fixed: parameter range of CPColor colorWithHue:saturation:brightness:.
Previously, + CPColor colorWithHue:saturation:brightness: took its parameters as degrees and percent (e.g. hue between 0º and 360º, saturation and brightness between 0% and 100%). However, in Cocoa the components are given as factors (0.0-1.0) like other colour methods.

This fix makes + CPColor colorWithHue:saturation:brightness: work like in Cocoa.
2013-04-20 12:41:13 +01:00
Antoine Mercadal 60f79bdf63 Merge pull request #1910 from Dogild/MenuColor
Fixed: CPMenu bar selected background color
2013-04-19 14:59:36 -07:00
Alexandre Wilhelm 96a772d4dc Fixed: CPMenu bar selected background color
- Previously the selected background color didn't have the right color.
2013-04-19 14:54:37 -07:00
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
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 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
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
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
Antoine Mercadal 90e11039a1 Merge branch 'CPDatePickerTarget' of https://github.com/Dogild/cappuccino into pr-1895 2013-04-05 11:40:27 -07:00
Antoine Mercadal 80d928eff2 Merge branch 'menuKeyboardNavigationFix' of https://github.com/BlairDuncan/cappuccino into pr-1894 2013-04-05 11:37:21 -07:00
Antoine Mercadal 838041ef59 Merge pull request #1872 from ahankinson/fix-tableview-method-documentation
Docs: Out of date documentation for CPTableView
2013-04-05 11:31:23 -07:00
Antoine Mercadal 732f94a284 Merge pull request #1883 from ahankinson/fix-textfield-ib-enabled
Fixed: Allow Interface Builder to set CPTextField enabled state
2013-04-05 11:30:54 -07:00
Antoine Mercadal 70081e1118 Merge pull request #1873 from ahankinson/fix-issue1866
Fixed: XCodeCapp adding duplicate files to Xcode project
2013-04-05 11:30:17 -07:00
Antoine Mercadal 35c15c90e4 Merge pull request #1890 from Dogild/MenuItemColor
Fixed: CPMenuBar theming
2013-04-05 11:28:57 -07:00
Alexandre Wilhelm 812cd463db Fixed: CPDatePicker works with action and target
Previously the CPDatePicker didn't work with the action and target. Now each time the dateValue changed, the given action is sent to the target.
This commit fix also a bug with moving with tab and the arrows. Before, the left arrow worked liked a tab when the firstElementTextField was selected in a textual CPDatePicker.

Test app in Tests/Manual/CPDatePicker.
2013-04-05 11:28:41 -07:00
Alexandre Wilhelm 090d097a53 Added action and target 2013-04-05 11:19:20 -07:00
Alexandre Wilhelm 36b337e784 Fixed bug about left moving 2013-04-05 11:13:28 -07:00
Blair Duncan 7d0d1056c0 Fixed – Menus no longer respond to keyboard navigation
When a menu is active, menu selection should change as characters are typed.
This can be seen in the manual CPMenuTest.

It used to work in the past but with all of the changes in the last few months to the compiler I
was not able to track down the exact commit that broke it. The code responsible for
clearing the _keybuffer after a brief delay in typing, was not being called,
resulting in a build up of characters.

This commit moves the check for delay to the interpretKeyEvent and takes care of
clearing the _keybuffer itself and removes that responsibility from the selection method.
2013-04-04 12:44:15 -04:00