Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Jens Alfke <email@hidden>
- Date: Sat, 12 Sep 2009 18:12:12 -0700
On Sep 12, 2009, at 6:01 PM, patrick wrote:
I am trying to find a example code for using one input textfield to
do a search on multiple search engines/sites. Can someone help me
out with the code?
If you can't find anything that does the whole thing for you, break it
into pieces and look for sample code for each piece.
1. Set up an action method that runs when the user hits Return in that
text field or presses a Search button.
2. For each search engine, generate an NSURL that contains the search
terms from the text field, in that engine's query syntax.
3. Send an NSHTTPURLRequest to that URL.
4. Parse the results, probably using NSXMLDocument. The XPath query
methods on it are a pretty powerful way to do this.
Follow-ups to cocoa-dev, since this isn't a question about development
tools.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden