Commit Graph
10331 Commits
Author SHA1 Message Date
Alexander Ljungberg 956a4c341c Fix: remove accidentally committed Sublime configuration files. 2013-02-25 20:00:42 +00:00
Alexander Ljungberg 5b05dc92a1 More dictionary literals. 2013-02-25 18:27:44 +00:00
Alexander Ljungberg 8bcbeb0aa9 Improve code readability with dictionary literals. 2013-02-25 17:02:36 +00:00
Alexander Ljungberg 472848da91 New: array literals in Objective-J 2.0.
Array literals look like `@[a, b, c]`.

This syntax is supported for completeness and source compatibility, but are not terribly useful since standard JavaScript arrays are toll-free bridged to CPArray.

Array literals could be handy if you're replacing CPArray with your own implementation.
2013-02-25 14:57:05 +00:00
Alexander Ljungberg 5200f945fe New: dictionary literals in Objective-J 2.0. 2013-02-25 14:24:29 +00:00
Aparajita Fishman a736bb4e93 fix (CPWindow): prevent empty content view when resizing a window
Previously, windows with no minimum size could be resized
by the user such that the content view was completely hidden, and then
resized such that the window was effectively turned inside out.
This obviously needed to be fixed.

Now, when the user resizes a window, each _CPWindowView subclass
is asked for the minimum resize size, with the size being additively
set by each subclass. This minimum size takes into account things
like the title bar, divider line, and close button, and always leaves
at least 2px height for the content view.

The user-requested size is then pinned to the minimum resize size.

In the process of fixing this bug, I discovered in the Cocoa docs
that the CPWindow -setFrame: methods should ignore minSize and maxSize.

Other changes:
- Take the divider height into account in contentRectForFrameRect for titled windows.
- Use _CG macros and fix formatting.

Closes #1753
2013-02-24 22:44:29 -05:00
Alexander Ljungberg 00f60ccaa4 Merge branch 'master' of github.com:cappuccino/cappuccino 2013-02-24 23:54:56 +00:00
Alexander Ljungberg 6d1c4a9570 Fixed: - CPMutableArray removeObjectIdenticalTo did not remove all instances, was documented incorrectly.
Contrary to what the previous documentation said, removeObjectIdenticalTo: should remove all instances of the argument from the receiver, not just the first one.
2013-02-24 23:51:48 +00:00
Aparajita Fishman c6a0e209ad Using a new naming scheme for tests 2013-02-24 18:51:22 -05:00
Alexander Ljungberg be4a168601 Make 30268f9865c compatible with Internet Explorer 8-. 2013-02-24 23:50:09 +00:00
aparajita 2c10671fe4 Merge pull request #1796 from ahankinson/fix-issue1685
Fixes #1685: CPToolbar calls incorrect notification method
2013-02-24 15:45:03 -08:00
Alexander Ljungberg b791289dfe Merge commit 'c4370240f8e31c257f038b661a2e171fe346f28b' 2013-02-24 23:44:00 +00:00
Alexander Ljungberg c4370240f8 Fixed: subclasses of CPMutableArray had broken removeObject:.
The `removeObject:` default provided in CPMutableArray would not work in subclasses because it relied on the class having a .length property.
2013-02-24 23:43:20 +00:00
aparajita fd0bdcba67 Merge pull request #1797 from cacaodev/issue1357
Fix for issue #1357
2013-02-24 15:42:58 -08:00
Alexander Ljungberg f805b6bfa6 Fixes #1409. Improve CPTabView decoding to fix tab selection errors.
This is an improved fix to the corrupted tab view state bug partially addressed by 0f347be.

Without either fix, NSTabView is converted to a CPTabView where tab view item views are subviews of the NSTabView, while in Cappuccino the selected view item is supposed to be a subview of a CPBox.

Without this fix, CPTabView decoding called addSubview: in initWithCoder: which can cause the superview of a view to become set, only to later be overwritten when the superview ivar is decoded.

This fix removes the tab item view as a subview from the tab view before encoding it in nib2cib, and then makes sure not to call addSubview: while still in the initWithCoder stage, but rather later in awakeFromCib.
2013-02-24 23:08:44 +00:00
Alexander Ljungberg 4188b274f7 Move special per class nib2cib processing to the classes themselves in awakeFromNib.
Having class specific code in the class makes more sense, and this will make it easier to add more class specific transformations.
2013-02-24 22:23:12 +00:00
cacaodev bf1e720ebc Merge remote-tracking branch 'upstream/master' into CPTableViewLion 2013-02-24 23:01:43 +01:00
Alexander Ljungberg 599351b56d Crash early in debug mode if addSubview: is called with a not fully decoded view.
If a view to be added is already a subview, but doesn't yet "know it" due to being only partially decoded, a corrupted view hierarchy with duplicate views would be set up, which is very hard to debug.
2013-02-24 21:39:04 +00:00
Martin Carlberg e8e87b3b83 Added recursive token transformer and preprocessor tokenizer 2013-02-24 22:26:27 +01:00
Alexander Ljungberg 84f42bdd05 Fixed: decoding a CPClipView could result in duplicate subviews.
This bug used to be concealed by the fact that we called [superview removeObject:X] when replacing a subview, which caused all duplicates to be removed.

Without this fix, the call to setDocumentView in CPClipView's decoding would try to add the document view as a subview. But when decoding, the clip view is already in the decoded list of subviews. Normally adding a subview twice would just move it to the end of the list of subviews, but this only works for fully decoded subviews where superview is not nil. Since we're in the middle of decoding there's no guarantee superview is set yet.

This fix avoids calling addSubview:.
2013-02-24 21:26:02 +00:00
Martin Carlberg 340f1e3258 Made the acorn parser able to run outside of the Cappuccino world 2013-02-24 22:25:00 +01:00
Alexander Ljungberg 75b72d601a Fixed: eliminate jake deploy warnings from default apps in 0.9.7. 2013-02-24 18:20:39 +00:00
cacaodev d2143844e3 Fix for issue #1357 2013-02-24 18:47:37 +01:00
Alexander Ljungberg ce7e5122e0 Fixes #829. Improve - CPView removeFromSuperview performance.
In the modified test described in #829 performance improves by at least 30% and that's with a significant addSubview: component diluting the test.

This change should improve outline and table view performance.
2013-02-24 17:36:30 +00:00
Alexander Ljungberg 0268f9865c Faster CPMutableArray removeObjectIdenticalTo:.
About 6-8X speedup by skipping all the `indexOfObjectIdenticalTo:` calls and going straight to JS `indexOf`.
2013-02-24 15:19:00 +00:00
Martin Carlberg 529e703ddd Merge branch 'master' of https://github.com/cappuccino/cappuccino into objj_compiler2 2013-02-24 15:45:56 +01:00
aparajita c401e3b55e Merge pull request #1497 from BlairDuncan/afterDocumentLoadFix
fix to enables the startup loader to continue if dynamically loaded
2013-02-23 18:01:28 -08:00
Andrew Hankinson 946b336e92 Added correct notification name. 2013-02-23 17:31:08 -05:00
Andrew Hankinson e40138c2ee Fixes #1685: CPToolbar calls incorrect notification method
This fix corrects the call in CPToolbar _setWindow to `removeObserver:name:object`. Before, this was calling the non-existent `removeObserver:object`, which would raise an exception.

This was fixed by @schipmolder.
2013-02-23 17:20:38 -05:00
Aparajita Fishman 3dad330a59 Font metrics calculations were broken, now fixed.
Updated FontMetricsExplorer application to modernize html files.
2013-02-23 16:02:05 -05:00
cacaodev fb3fe24567 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	Tests/Manual/CPOutlineViewCibTest/Resources/MainMenu.cib
2013-02-23 20:55:54 +01:00
Aparajita Fishman a011596231 CGContext fixes/enhancements
- NEW: Retrieve the underlying Image element from a CPImage with -image.
- NEW: You can now render any arbitrary drawing to a pattern context and use that as a fill or stroke pattern. See CGContextCreatePatternContext, CGContextSetFillPattern and CGContextSetStrokePattern. Works in all canvas-enabled browsers, including IE 9+.
- NEW: An example of using a custom rendered pattern is in Tests/Manual/PatternFillTest.
- NEW: Test if a CPImage is a single image (vs. three/nine part) with -isSingleImage.
- FIXED: With canvas, we have to track ourselves whether the context has a path or not.
- FIXED: All shapes except rects may not be added to a path with no context. If you attempt to do so, an error is logged.
- FIXED: CGPath was not setting the start and current point correctly in some cases.
- FIXED: CGContextAddPath was not moving to the path's start point at the beginning.
- FIXED: Removed superfluous CGContextClosePath commands, fixed some drawing sequences.
- FIXED: Misc. formatting.

Sorry, these changes are canvas only (including IE 9+)! I am not going to spend the time to port these fixes to VML (IE 8).
2013-02-23 13:53:20 -05:00
Blair Duncan ac5a4b88d2 updated the testfile 2013-02-23 10:24:29 -05:00
cacaodev 12e743f9dc nib2cibed viewBasedCib example to resurrect scrollers 2013-02-23 14:52:38 +01:00
cacaodev 5355c4935c Merge remote-tracking branch 'upstream/master' into CPTableViewLion 2013-02-23 14:51:46 +01:00
Aparajita Fishman f54f2e7b13 selectNone: is not part of the NSTableView API, not sure why we need it since it is the same as deselectAll: 2013-02-23 08:26:36 -05:00
aparajita 835096c089 Merge pull request #1794 from cacaodev/CPImageView-bindings
CPImageView bindings improvements
2013-02-23 04:33:19 -08:00
cacaodev 16bb194019 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.cib
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.xib
2013-02-23 10:55:08 +01:00
Aparajita Fishman a9952a28a4 CPRadioGroup enhancements
- You may now bind radio groups to selectedValue, selectedTag, selectedIndex, enabled, and hidden. enabled and hidden are multiple value bindings.
- Added some API to CPRadioGroup that parallels NSMatrix: selectRadioAtIndex:, selectRadioWithTag:
- Added setEnabled/setHidden, they operate on all of the radios in the group.
- Sample app to demonstrate all new features.
2013-02-23 00:01:19 -05:00
Aparajita Fishman 67624208de XcodeCapp improvements
- Convert to ARC, garbage collection is deprecated.
- Support radio buttons and groups as outlets in IB.
2013-02-22 23:56:21 -05:00
Aparajita Fishman ce0aadfcf7 Optimizations
No need to copy result of [self bounds], it's already a copy
2013-02-22 23:29:17 -05:00
Aparajita Fishman 7c677de10a Fixed bugs in CPColorWithImages and CPImageInBundle 2013-02-22 21:58:12 -05:00
Aparajita Fishman f590d38746 Revert "Fixed a bunch of bugs in CGContextCanvas and CGPath."
This reverts commit 7ab84ca607 until I can figure out why it is breaking other things.
2013-02-22 16:56:19 -05:00
cacaodev 3591ba0f89 CPImageView bindings improvements
Cache image for the CPValue(URL|Path)Binding.
Support for reverse bindings CPValueBinding, CPValue(URL|Path)Binding,
CPDataBinding.
2013-02-22 22:11:42 +01:00
Alexander Ljungberg 80170cfa03 Merge branch 'refs/heads/slevenbits-nsbox-custom-fix' 2013-02-22 19:46:13 +00:00
Alexander Ljungberg 1cb8844470 Fixed: custom NSBoxes placed in Xcode became smaller in Cappuccino.
Without this fix, a regular custom NSBox such as a simple box with a 1px border would become several pixels smaller in Cappuccino.

This fix makes sure we only try to adjust the size for primary and secondary type NSBoxes.
2013-02-22 19:45:56 +00:00
Alexander Ljungberg 9be703e271 Merge branch 'refs/heads/slevenbits-tabview-cib-fix' 2013-02-22 19:10:28 +00:00
Alexander Ljungberg a19ec35a47 Fixes #1409. Fixed: broken tab view decoded from xib in certain situation.
Without this fix, a tab view set up in Xcode where a tab but the first was selected could be instantiated in a corrupted state in Cappuccino, where tab selection would have no effect.

This fix ensures that even if the decoded view of the selected tab view item has a superview different from how we do things in Cappuccino, we make sure to set it right.
2013-02-22 19:08:38 +00:00
Aparajita Fishman 47ade360d5 Formatting 2013-02-22 12:40:43 -05:00
aparajita 0e669417cd Merge pull request #1791 from BlairDuncan/tableViewSelectAll
tableview add support for selectAll: deSelectAll:  selectNone:
2013-02-22 07:59:11 -08:00