Resetting an NSSearchField, part 2
Resetting an NSSearchField, part 2
- Subject: Resetting an NSSearchField, part 2
- From: "Dan S. Camper" <email@hidden>
- Date: Wed, 08 Jun 2005 10:43:29 -0500
All:
This is somewhat of a repeat. I've done a lot more research and poking into
the problem but still have not found a solution.
I'm attempting to implement a feature where a user can "reveal" an item that
has been found in an NSOutlineView by entering text in an NSSearchField.
The "reveal" method is implemented via a contextual menu on a selected item
and basically restores the view's full contents, expands parent items,
selects and scrolls to the thing they want to reveal. Expanding, selecting,
et. al. all works fine providing I ignore the NSSearchField's last search
value.
My problem is the NSSearchField itself. I'd like to clear the user's entry
when I restore the list to visually indicate that the list is now
unfiltered. At present, I've been unable to figure out how to reset that
darn field. A simple setStringValue:@"" call doesn't work, nor does some of
the more esoteric method calls I've tried further up the NSSearchField
inheritence path. I've also tried a direct performClick: on the cancel
button but that has no apparent effect.
Is there a way to programmatically reset the NSSearchField text? I feel
like there should be and I'm just missing the blindingly obvious.
Thanks,
DSC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden