Commit Graph
105 Commits
Author SHA1 Message Date
Alexandre Wilhelm 30413e6f8f Merged conflict in CPComboBox 2014-11-26 16:00:03 -08:00
Alexandre Wilhelm 51940cea3d Fixed: leak memory with CPTableViews delegate 2014-11-26 15:05:22 -08:00
Antoine Mercadal f9275a70af FIXED: New warnings reveleaded by ivar type checking
This patch fixes all new warnings
2014-11-06 10:17:05 -08:00
Martin Carlberg e511638962 Fixed: Cleaned up return and parameter types on methods. 2013-11-24 22:21:56 +01:00
Martin Carlberg bb58a206a8 Fixed: Removed all warnings of conflicting return and parameter types caused by the new compiler 2013-08-12 16:46:14 +02:00
Aparajita Fishman afd5925499 Fixed: _CG and _CP macros were confusing and could degrade performance
Previously, Cappuccino was using preprocessor macros internally for the CGPoint/Size/Rect/Inset/Affine functions, as well as for CPRange. These macros had the same name as the corresponding function, but began with _. The functions were actually defined using the macros.

The motivation behind using macros was to increase performance by reducing function calls. However, there were a number of problems with this approach:

- There was an artificial dichotomy between _CG macros and the corresponding CG functions. We never completely replaced CG function calls with _CG macros. In fact, they were often mixed up in the same file. There was an extra burden on the programmer to remember to use the macro instead of the function.
- If a method call was passed as an argument to a macro, performance could actually be significantly *worse* than a function call. For example, _CGGetRectMakeCopy([view frame]) would expand to `{ origin:{ x:[view frame].origin.x, y:[view frame].origin.y }, size:{ width:[view frame].size.width, height:[view frame].size.height } }`. So instead of a single objj_msgSend and a single simple function call, we ended up with 4 objj_msgSend calls, which are way more expensive than simple function calls.
- Because of this expansion problem, to use macros efficiently required us to remember to use variables for all macro parameters. This didn't happen, and shouldn't have to happen.
- Finally, with modern Javascript engines, function call overhead is so small that it really isn't worth using the macros.

This commit eliminates the _CGGeometry, CGAffineTransformation and CPRange macros and replaces them with function calls.

BREAKING CHANGE:
The macros are no longer available. They could only be used with compiled code, but if there is any user code that used them, they will have to be replaced with the corresponding functions.
2013-03-13 12:22:10 -04:00
cacaodev 7d03483210 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	AppKit/CPView.j
2013-02-26 11:56:18 +01:00
Alexander Ljungberg 5b05dc92a1 More dictionary literals. 2013-02-25 18:27:44 +00:00
cacaodev 108042c190 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	AppKit/CPTableView.j
	Tests/Manual/TableTest/TableCibTest/AppController.j
2013-02-13 19:27:53 +01:00
Aparajita Fishman 4f377bcebe Objj2 compiler fixes
Compiled all files individually:

- Added missing imports.
- Added @class/@global declarations to break circular dependencies.
- Misc. code cleanup.

Conflicts:
	AppKit/CPWindow/_CPWindow.j
	AppKit/Platform/DOM/CPPlatformWindow+DOM.j
2013-01-23 15:48:55 +07:00
cacaodev 2cc3521989 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Conflicts:
	Tests/Manual/CPOutlineViewCibTest/Resources/MainMenu.cib
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.cib
2013-01-18 16:57:46 +01:00
Martin Carlberg 458fa9d02e Fixed a lot of small bugs found by new warning message from compiler 2013-01-18 14:24:37 +01:00
Martin Carlberg c297e926f9 Compiler now works with jake and can compiler the whole Cappuccino framework. A lot of test cases still fail 2012-12-16 17:38:47 +01:00
cacaodev f568a2407b Merge remote-tracking branch 'upstream/master' into CPTableViewLion 2012-11-13 11:22:03 +01:00
Alexander Ljungberg 7de4fe7afa Fixed: automatic table view sort descriptors didn't work for deeper bindings.
If a table view column showed for example `arrangedObjects.user.name`, it would try to sort arranged objects by `name` instead of `user.name`.
2012-10-23 15:24:10 +01:00
cacaodev 5b1cf49170 Merge remote-tracking branch 'upstream/master' into CPTableViewLion 2012-10-15 14:23:24 +02:00
Alexander Ljungberg a70bc7d953 "Creates Sort Descriptors" CPTableColumn value binding option.
With this option an array controller driven table view can be sorted by clicking the table column headers without manually setting up sort descriptor prototypes.

If `CPCreatesSortDescriptorBindingOption` is enabled on a table column value binding, sort descriptors will be created automatically. The default value for this option is YES.
2012-10-14 18:27:25 +01:00
cacaodev f29f39d427 Merge remote-tracking branch 'upstream/master' into CPTableViewLion
Renamed Test apps.

Conflicts:
	AppKit/CPTableView.j
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.cib
	Tests/Manual/TableTest/TableBindings/Resources/MainMenu.xib
2012-07-13 13:38:49 +02:00
Aparajita Fishman 4af061516c CPTableColumn -setHidden documentation was backwards. 2012-07-10 21:53:51 -07:00
cacaodev 67f7649f6c CPTableView with Lion's view-based API
Added : -makeViewWithIdentifier:owner:
	  -rowForView: columnForView: less performant tahn cocoa because we cycle through all visible rows. But these methods are generally used once when editing manually.
  Added identifier property to CPView.

  retro and forward (in IB) compatible with the existing API. You can use IB table view based without the new API. Existing table views / Nib won't break.

  CPTableView view based example. Featuring: IB made data views, different views in the same column, subviews binding in IB

When the view is found automatically in the cib, instantiate with _delegate as the owner (cocoa behavior).
2012-04-13 09:19:23 +02:00
Alexander Ljungberg 25676b4460 Fixed: reverse value transformations were not applied for table view bindings. 2012-03-27 13:56:25 +01:00
Randall Luecke 3b4ad1d583 Remove 2nd call to setHeaderView: 2012-02-02 17:06:31 -05:00
Alexander Ljungberg 021f5bb030 Fixed: disappearing or fuzzy table header dividing lines at certain table sizes. 2011-10-20 18:51:59 +01:00
Alexander Ljungberg 04d33e772f Allow binding a table column value to an array controller reached through a key path.
Cocoa might not support this but it is reasonable and consistent, and allows indirect bindings when using multiple CIB files.
2011-10-06 01:59:56 +01:00
Alexander Ljungberg 8fdcbac2bd Fix CPTableColumn width, minWidth and maxWidth encoding. 2011-05-29 23:18:30 -04:00
Alexander Ljungberg 76400ecca9 Make table column internal bindings support methods private. 2011-03-31 20:48:51 -04:00
Alexander Ljungberg dae36cda56 Bindings support for inline table view cell editing. 2011-03-31 20:26:56 -04:00
Randall Luecke a7c5ca740a Typo in doc changes 2011-03-05 00:20:28 -05:00
Randall Luecke 590b3705eb Style changes for table column documentation. 2011-03-04 23:15:24 -05:00
Stephen Ierodiaconou 6a942630e4 Fixing spelling mistakes 2011-01-24 11:05:48 +02:00
Alexander Ljungberg 40b04b7956 Merge branch 'master' of github.com:280north/cappuccino into cacaodev-CPTableColumnValueBinder
Conflicts:
	AppKit/CPTableColumn.j
2011-01-20 21:56:30 -03:00
Randall Luecke f07543045a Doc fixes and more docs in the tableview. 2011-01-20 03:07:01 -05:00
cacaodev 235b323658 Add CPTableColumnValueBinder. This binder subclass just reloads the table column when a table column's value binding is updated because of a change in the bound-to object.
TableBindings test.
2011-01-19 19:56:46 +01:00
Randall Luecke 05e69c85c7 More documentation of the tableview, outlineview, and table columns. Wrapped formatted documenation in <pre> tags and added sample code for using custom dataviews 2011-01-12 23:40:28 -05:00
Klaas Pieter Annema 3d5232b308 give objects a chance to change their binder class
- make every object calling getBinding:forObject: aware of this change
- implement _CPCheckBoxValueBinder to handle binding to the value of a checkbox Closes: #1083
- re-implement CPTextField's behavior for controller markers using the new binder class
- disabled some tests that are not compliant with Cocoa
2011-01-07 14:14:19 +01:00
Randall Luecke 97b141b653 Fixes for uniform column resizing 2010-12-26 13:44:31 -06:00
Randall Luecke b8f9263d18 Fixed some 3am typos in the documentation 2010-12-21 16:55:00 -05:00
Randall Luecke 946cd381a0 Compelete documentation of the tableview and tablecolumns (which the exception of bindins) 2010-12-21 02:29:14 -05:00
Brian Donovan 6f724e34f5 Fix apostrophe typo. 2010-12-17 17:14:58 -08:00
Daniel Brajkovic 6bd064f289 Fixed errors in the incompatibility CPException reasons. For example -setHeaderView instead of setHeaderCell. 2010-11-18 12:33:17 -06:00
Klaas Pieter Annema 0c62609e76 made CPTableView aware of a resize in CPTableColumn 2010-11-05 11:02:05 +01:00
Francisco Ryan Tolmasky I 52f7844aee Made it so .h files are automatically included in AppKit (avoiding needing to manually include Platform.h, etc.).
Also changed a bunch of <AppKit/*> imports to "*" imports.

Reviewed by me.
2010-11-01 11:10:01 -07:00
Klaas Pieter Annema 7129094e26 always archive the table column it's dataView when it's set
Don't equality check so the data view is always re-archived when it's set. A dataView with a different font size should be re-archived, but will not be if we check for equality.
2010-10-12 13:47:15 +02:00
Paul Baumgart 01852d8075 Fix a bunch of missing @imports.
All classes (excluding the ones prefixed with underscores) in Foundation
and AppKit can now be loaded individually except CPOpenPanel and
CPSavePanel. These two classes have some sort of dependency cycle
that seems impossible to resolve without forward declarations (which
we don't have).
2010-10-05 15:54:25 -07:00
Klaas Pieter Annema 04b331ad55 decode CPTableColumn resizing mask as integer 2010-09-09 16:36:32 +02:00
Alexander Ljungberg 112ad65882 Support value transformers in CPTableColumn when using bindings. 2010-08-13 20:19:35 -04:00
Aparajita FishmanandRoss Boucher edc5542ee6 Fix for issue #748 2010-07-28 15:24:37 -07:00
Ross Boucher e586273a3f Fix accidental global. 2010-07-28 14:13:12 -07:00
Ross Boucher d4a0f0cd21 Merge remote branch 'klaaspieter/fix/787-cptablecolumn-editability' 2010-07-28 14:12:49 -07:00
Randall Luecke cffbf86351 TableView theming 2010-07-22 00:21:02 -05:00