(no subject)
(no subject)
- Subject: (no subject)
- From: Francisco Tolmasky <email@hidden>
- Date: Tue, 18 Mar 2003 18:01:21 -0800
Ok, so I have this search text field. It usually says "search" in
gray, until u click on it, here is the code to do this:
- (BOOL)becomeFirstResponder
{
if(!_keyEntered)
{
[self setStringValue: @" "];
[self setTextColor: [NSColor blackColor]];
}
return [super becomeFirstResponder];
}
_keyEntered is false until a key is entered. But for some reason, this
code will not replace the string in the text field with an empty
string, in fact it does nothing. Now, when I replace the line [self
setStringValue: @" "]; with [self setStringValue: @"c"] then it does
replace the string with a "c". I don't understand why it won't do it
with "".
Thank you in advance,
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.