Make CPTextFields setPlaceholderString resettable
Reported by Moritz Angermann | March 7th, 2009 @ 01:09 AM
The way it is now, prevents one to change the placeholder text later on. (The first set placeholder text stays and is not updated).
var tf = [[CPTextField alloc] initWithFrame:CGMakeRectZero()]; [tf setPlaceholderString:@"No value"]; [tf setPlaceholderString:@"No selection"];
will display "No Value" instead of "No selection".
Proposed change below for CPTextField.j
-(void)setPlaceholderString:(CPString)aStringValue {
if(_placeholderString && [self stringValue] === _placeholderString)
_value = @""; // or nil. or a flag.
_placeholderString = aStringValue;
//if there is no set value, automatically display the placeholder
if (!_value)
[self setStringValue:_placeholderString];
}
Comments and changes to this ticket
-
admin (at 280north) March 7th, 2009 @ 07:06 PM
- State changed from new to resolved
- Tag changed from bug, cptextfield, patch to @to-review, bug, cptextfield, patch
(from [88035429bb5de912a7d804a8659b5af542f6faeb]) Fix in CPString setPlaceholderString
[#238 state:resolved] http://github.com/280north/cappu...
-
admin (at 280north) August 25th, 2009 @ 01:26 PM
(from [d1c0237bf3fd2fb566a465ec25cabe60ce5f8df4]) Fix for recursive notification postings crashing. Also fixed sizing issues with tableview, including crashing when not in a superview.
Closes #238.
Reviewed by me.
http://github.com/280north/cappuccino/commit/d1c0237bf3fd2fb566a465...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.
People watching this ticket
- Nobody is watching this ticket.
Tags
Referenced by
- 238 Make CPTextFields setPlaceholderString resettable Closes #238.
- 238 Make CPTextFields setPlaceholderString resettable [#238 state:resolved] http://github.com/280north/cappu...