• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(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.

  • Prev by Date: Re: unknown class in nib file
  • Next by Date: Proper way to run runloop for DO server?
  • Previous by thread: Re: (no subject)
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread