Changeset [4c562048dc3df56a3778e82b1b9e1d5712162189] by Aparajita Fishman

July 28th, 2010 @ 11:53 AM

More fixes to CPSearchField (Cocoa compliance and bugs):

  • Added the ability to specify a separator in the template by using the tag CPSearchFieldSeparatorMenuItemTag.
  • recentSearches was not being initialized by -initWithCoder, moved that code into -init.
  • -setSearchMenuTemplate was not being invoked. Since having a recents menu is the default behavior in Cocoa, it should probably be the default behavior in cappuccino. To turn it off, set _maximumRecents to >= 254.
  • -searchTextRectForBounds was using the wrong rect for -searchButtonRectForBounds and -cancelButtonRectForBounds, resulting in a rect that was too narrow and did not fill the space.
  • Tightened up the spacing between the magnifying glass and the text to exactly Cocoa distance.
  • Overhauled - updateSearchMenu to fix some logic bugs.
  • Made sure the search field becomes first responder after closing the search menu.
  • Cleared the search string when clearing recent searches, this is what Safari does.
  • Removed redundant invoking of -setDelegate in -initWithCoder.
  • -init has to be called last in initWithCoder. http://github.com/280north/cappuccino/commit/4c562048dc3df56a3778e8...

Committed by Aparajita Fishman

  • M AppKit/CPSearchField.j
New-ticket Create new ticket

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.

Shared Ticket Bins