Commit Graph
123 Commits
Author SHA1 Message Date
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
Klaas Pieter Annema eee1dcef13 restore the original placeholder when unbinding 2011-01-07 14:14:19 +01:00
Alexander Ljungberg 4445f752f3 Avoid usage of [event keyCode].
Key codes have platform and browser specific behaviours.
2011-01-02 13:15:38 -03:00
Alexander Ljungberg c0af2af7e7 Merge branch 'master' of https://github.com/Kentzo/cappuccino into Kentzo-master 2010-12-31 15:12:35 -03:00
Alexander Ljungberg fa3df44535 Fixed: the text field selectText: message worked significantly differently in unit tests than in the browser.
The message normally makes the text field the first responder, but this did not happen outside of the DOM platform.

Also documented the first responder side effect.
2010-12-31 14:49:03 -03:00
Ilya Kulakov 044fc3af69 Refs issue #1607. Make CPTableView the first responder after user is done editing dataview. 2010-12-31 12:07:42 +06:00
Ross Boucher 68a15c5c7c Be more lenient in documents about strings versus URLs.
Fix a typo in CPTextField.
2010-12-16 17:22:32 -08:00
Klaas Pieter Annema 221fad6c3e improve _setCurrentValueIsPlaceholder logic 2010-11-23 12:03:00 +01:00
Randall Luecke c52b40657a Removed frame resizing in the textfield's initWithCoder: 2010-11-03 22:54:09 -04: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 6e9f82212b rename CPView +themeClass to +defaultThemeClass 2010-10-25 14:15:22 +02:00
Randall Luecke 00e638f406 initWithCoder on CPTextField should respect the larger height value if it's set. 2010-10-18 01:30:25 -04:00
Klaas Pieter Annema 802d7d53b0 fix multiline bezeled textfields being sized when initialized from coder 2010-10-12 11:26:28 +02:00
Aparajita Fishman ab430b3574 Forgot to update sizeToFit documentation. 2010-10-08 10:18:38 -04:00
Aparajita Fishman b8ae14d3a8 Fixes and more tests:
- Fixed _minimumFrameSize to take into account bezel and line break mode.

- Added test to show how sizeToFit was broken for multi-line labels in the old code.

- Added test to verify that behavior is correct for single-line labels.
2010-10-08 10:17:12 -04:00
Aparajita Fishman b6491f7bb8 CPTextField -initWithCoder was not ensuring the frame size was high enough. The default label height in IB is 17px, which unmodified was cutting off the bottom pixel of labels in Cappuccino. 2010-10-06 08:43:21 -04:00
Alexander Ljungberg ed4235d2f9 Fixed: setting any binding on a text field - even on an attribute like 'hidden' - would clear its placeholder string. 2010-10-02 14:42:06 -04:00
Klaas Pieter Annema 4211abd0b0 handle tab key as early as possible in CPWindow sendEvent: 2010-09-27 11:53:07 +02:00
Klaas Pieter Annema d8c0d2da8e don't reverse set binding if textfield is showing a bindings placeholder 2010-09-23 10:35:42 +02:00
Klaas Pieter Annema e59f20668b don't set objectValue in resignFirstResponder if it didn't change
This change makes sure that the textfield doesn't sent change notifications if the value didn't actually changed when resigning first responder.
2010-09-23 10:35:41 +02:00
Klaas Pieter Annema 8fe67b73da implement _setCurrentValueIsPlaceholder in CPTextField
CPKeyValueBinding will sent _setCurrentValueIsPlaceholder: to indicate to an object that current value is a placeholder and should be displayed as such. This commit implements the method for CPTextField and adds a unit test to test the behavior.
2010-09-23 10:35:41 +02:00
Klaas Pieter Annema 2fba03dc75 fix style issues in CPTextField and CPKeyValueBindingTest 2010-09-23 10:35:41 +02:00
Blair DuncanandRandall Luecke b27560c51e Fix for issue 841 where the edit cursor would not always flash 2010-08-27 19:46:55 -04:00
Aparajita FishmanandAlexander Ljungberg 0b1b1bbe0b Fix for issue #817 (Support for alignment and line break mode in NSTextField/CPTextField) 2010-08-11 23:53:34 -04:00
Alexander Ljungberg e4c79d2101 Closes #809. End editing of a text field if it is disabled or made uneditable. Manual test included. 2010-08-02 23:13:06 -04:00
Ross Boucher 7c5a07f709 Fix the issue where CPSecureTextField would sometimes cause all other text fields to go crazy afterwards. 2010-06-23 19:58:43 -07:00
Randall Luecke 39ba9b9a4f setSeletable now works in CPTextField. Closes #690 2010-06-06 16:26:51 -05:00
Francisco Ryan Tolmasky I ae47509aa7 Add convinience methods for dealing with multiple objects and controls.
Reviewed by me.
2010-04-27 01:04:46 -07:00
Alexander LjungbergandRoss Boucher a7021e6b66 Fixed a parameter type typo. 2010-04-21 15:48:47 -07:00
Scott KyleandRoss Boucher 5d3eae9022 deleteBackwards: => deleteBackward: 2010-03-22 14:30:48 -07:00
Randall Luecke 119c950b53 Merge branch 'master' of git://github.com/280north/cappuccino 2010-03-05 23:39:31 -05:00
saikatandRoss Boucher 9537a62ab1 Fixes calling selectText in the text field's delegate's controlTextDidFocus: method. 2010-03-05 10:49:23 -08:00
klaaspieterandRandall Luecke 440eed77cf Merge commit 'klaaspieter/outlineview' into outlineview
Conflicts:
	AppKit/CPDragServer.j
	AppKit/CPTableView.j
	Tests/Manual/TableTest/AppController.j
2010-03-05 02:40:47 -05:00
Ross Boucher 1328bc732f Move around some imports and constant declarations. 2010-02-17 16:29:57 -08:00
Francisco Ryan Tolmasky I bc53288fca Fix for failing CPAttributedString test.
Reviewed by me.
2010-02-13 16:14:18 -08:00
Ross Boucher 0e558d54e5 Move CPControl constants to that file (from CPTextField).
Respect line break mode in NSControl nib2cib.

Closes #420.
2010-02-12 21:16:44 -08:00
Klaas Pieter Annema c85e33c034 Fixed a bug where the CPTextField value was not updated properly when the update happened in the same 'runloop' iteration as becomeFirstResponder 2010-02-03 10:11:32 +01:00
Ross Boucher a354b4acd5 Temporary fix for 0.8 for copy/paste behavior in CPTextField.
Closes #407.
2010-01-27 16:36:39 -08:00
Ross Boucher 7ce72a31c5 Rather than throwing out the entire cappuccino body, throw out a specific div if that div is available.
("cappuccino-body"). This let's external libraries, esp. flash ones, add things to the body without
Cappuccino getting rid of them as soon as the page loads.

Closes #421.
2010-01-22 19:40:33 -08:00
Nicholas Small 204df99375 Make CPPanel -becomesKeyOnlyIfNeeded and CPView -needsPanelToBecomeKey work. 2010-01-15 17:23:56 -05:00
Ross Boucher c859ffd0f7 Support for copy/paste/cut and selectedRange/setSelectedRange in CPTextField.
Improvements to the Pasteboard integration code from yesterday.
2009-12-13 18:29:25 -08:00
Ross Boucher cd2dd9f12d Remove dead variables 2009-12-03 16:28:56 -08:00
Ross Boucher 56a739655f A whole bunch of textfield and key event fixes. 2009-12-02 17:14:47 -08:00
Ross Boucher e20311c25a minor text field change 2009-11-13 22:24:45 -08:00
Ross Boucher aaac5e429d New textfield code that passes keyboard events through the standard mechanisms. Still broken in IE. 2009-11-12 11:24:23 -08:00
saikatandTom Robinson eeae653c94 Made secure text fields have the right number of characters when focus is taken away from them. Closes issue #318. 2009-11-02 00:35:53 -08:00
Ross Boucher 9f2ea190fc Make text field KVO compliant again. 2009-10-28 20:20:33 -07:00
Ross Boucher 4248348308 Updates to the way notifications work. New notifications for focus/blur. 2009-10-28 20:01:00 -07:00
Ross Boucher ba84e6d3e2 Support for sendsActionOnEndEditing in CPControl. Only works for textfields right now. 2009-10-28 00:12:03 -07:00
Tom Robinson 76edc4f914 Use Array(n).join(ch) trick for strings of identical chars 2009-10-26 16:47:09 -07:00