Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't clear text of HISearchField



I make an HISearchField using HISearchFieldCreate. I'm trying to handle kEventSearchFieldCancelClicked by clearing the text:

s = ::SetControlData(fSearchField, kControlEntireControl, kControlEditTextCFStringTag,
sizeof(CFStringRef), CFSTR(""));

But this results in console output of

*** _NSAutoreleaseNoPool(): Object 0x326620 of class NSCFString autoreleased with no pool in place - just leaking
*** +[NSCFString length]: selector not recognized
*** _NSAutoreleaseNoPool(): Object 0x326420 of class NSCFString autoreleased with no pool in place - just leaking
*** _NSAutoreleaseNoPool(): Object 0x326790 of class NSCFString autoreleased with no pool in place - just leaking
*** _NSAutoreleaseNoPool(): Object 0x326770 of class NSException autoreleased with no pool in place - just leaking
*** Uncaught exception: <NSInvalidArgumentException> *** +[NSCFString length]: selector not recognized

Since there is no control part defined for the text, I wonder if that's the problem. Or is this a HISearchField bug?

(Speaking of HISearchField bugs, Totte Alm wrote

I just want to make all of you US developers aware of a bug I've found
and reported
on the HISearchField on non-US keyboards, when the search is started
using [Return], (it works with [Enter].
When a event i fired using the [Return] -key, the bug adds a <space>
0x20 character after the entered search,
with non-US keyboards, so trim any text before you use it.

The behavior is also wrong with US keyboards.)
--

David Dunham A Sharp email@hidden
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.