<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for iCab Blog</title>
	<atom:link href="http://www.icab.de/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icab.de/blog</link>
	<description>iCab related stuff; Mac, iPhone and Cocoa programming</description>
	<lastBuildDate>Thu, 18 Mar 2010 19:05:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2034</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2034</guid>
		<description>Now it&#039;s working! Thank you very much for your support!</description>
		<content:encoded><![CDATA[<p>Now it&#8217;s working! Thank you very much for your support!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2032</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:48:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2032</guid>
		<description>@AlexT
There are two issues in your project...

First, the file with the JavaScript code is named &quot;Searchscript copy.js&quot;, but in the method &quot;highlightAllOccurencesOfString:&quot; you&#039;re trying to load a JavaScript file named &quot;WebViewSpan.js&quot;. 
And because you&#039;re using the wrong name to load the JavaScript code, it won&#039;t be loaded and therefore calling the JavaScript code fails.

Second, you have forgotten to add the JavaScript file into the &quot;Copy Bundle Resources&quot; section of the &quot;target&quot; of your project (see the &quot;target&quot; item in the sidebar of the XCode project window). The JavaScript file must be added into the &quot;Copy Bundle Resources&quot;, otherwise it won&#039;t be copied into the app bundle. And if it is not copied into the app bundle, the file can not be loaded from the app.

So you only need to correct these two issues and it will work fine.</description>
		<content:encoded><![CDATA[<p>@AlexT<br />
There are two issues in your project&#8230;</p>
<p>First, the file with the JavaScript code is named &#8220;Searchscript copy.js&#8221;, but in the method &#8220;highlightAllOccurencesOfString:&#8221; you&#8217;re trying to load a JavaScript file named &#8220;WebViewSpan.js&#8221;.<br />
And because you&#8217;re using the wrong name to load the JavaScript code, it won&#8217;t be loaded and therefore calling the JavaScript code fails.</p>
<p>Second, you have forgotten to add the JavaScript file into the &#8220;Copy Bundle Resources&#8221; section of the &#8220;target&#8221; of your project (see the &#8220;target&#8221; item in the sidebar of the XCode project window). The JavaScript file must be added into the &#8220;Copy Bundle Resources&#8221;, otherwise it won&#8217;t be copied into the app bundle. And if it is not copied into the app bundle, the file can not be loaded from the app.</p>
<p>So you only need to correct these two issues and it will work fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2030</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2030</guid>
		<description>Ok, I put here the link to the archive of my example project:
http://dl.transfer.ro/Javascrpttrickkk-transfer_ro-18mar-4c1fc518.zip. In short: enter text through a textfield and i send it by pushing a button (ibaction - apasa) and expect that text to be highlighted and the occurrences counted. I have put 2 NSLog so I can watch in the console if the parameter is sent to the &#039;highlight method&#039;. Please help me figure out where I did wrong in implementing your JavaScript solution. Thank you very much for looking into this!</description>
		<content:encoded><![CDATA[<p>Ok, I put here the link to the archive of my example project:<br />
<a href="http://dl.transfer.ro/Javascrpttrickkk-transfer_ro-18mar-4c1fc518.zip" rel="nofollow">http://dl.transfer.ro/Javascrpttrickkk-transfer_ro-18mar-4c1fc518.zip</a>. In short: enter text through a textfield and i send it by pushing a button (ibaction &#8211; apasa) and expect that text to be highlighted and the occurrences counted. I have put 2 NSLog so I can watch in the console if the parameter is sent to the &#8216;highlight method&#8217;. Please help me figure out where I did wrong in implementing your JavaScript solution. Thank you very much for looking into this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2026</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 17 Mar 2010 21:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2026</guid>
		<description>@AlexT
The best would be if you create a simple example project and either send it to my by email or post a link to the archive with the project here in the comments (note: comments with links require a manual approval to prevent spam, so you may notice a delay before the comment will be visible).</description>
		<content:encoded><![CDATA[<p>@AlexT<br />
The best would be if you create a simple example project and either send it to my by email or post a link to the archive with the project here in the comments (note: comments with links require a manual approval to prevent spam, so you may notice a delay before the comment will be visible).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2025</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Wed, 17 Mar 2010 20:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2025</guid>
		<description>Me again. Hoping I am not too annoying, I want to tell you that I solved the above problem, everything is in place except for the work of the script. It doesn&#039;t highlight, nor shows the number of occurrences. I have put an NSLog before returning the result (which is the number of occurrences) that shows the value. In all cases the result is 0 - meaning no occurrence found.  To sum up: str is correctly sent from the controller where I invoke &quot;highlightAllOccurencesOfString:&quot; just the way you indicated. Still, highlight/show occurrences doesn&#039;t work. What could be wrong now? Would you be so king looking in my code (not long) ? If so, should I post it here or send it to you some other way? Thanks again.</description>
		<content:encoded><![CDATA[<p>Me again. Hoping I am not too annoying, I want to tell you that I solved the above problem, everything is in place except for the work of the script. It doesn&#8217;t highlight, nor shows the number of occurrences. I have put an NSLog before returning the result (which is the number of occurrences) that shows the value. In all cases the result is 0 &#8211; meaning no occurrence found.  To sum up: str is correctly sent from the controller where I invoke &#8220;highlightAllOccurencesOfString:&#8221; just the way you indicated. Still, highlight/show occurrences doesn&#8217;t work. What could be wrong now? Would you be so king looking in my code (not long) ? If so, should I post it here or send it to you some other way? Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2023</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2023</guid>
		<description>@AlexT
According to the error message I think that you have not added the JavaScript code as resource file into your project. Instead XCode tries to compile and link the JavaScript code. But this is wrong.

What you have to do is to make sure that the JavaScript file is treated as resource file in your XCode project. To do this, look in  XCode in the sidebar of the project window for the &quot;Targets&quot; section. Within the &quot;Targets&quot; section you&#039;ll find your Target and within the target you&#039;ll find several task which have to be done to create your application. I assume that the JavaScript file was added to the &quot;Compile Sources&quot; task. But it should have bee added to the &quot;Copy Bundle Resources&quot; task. So what you need to do is to open &quot;Compile sources&quot;, find the JavaScript file and then drag it into &quot;Copy Bundle Resources&quot;.

This should solve your problem.
</description>
		<content:encoded><![CDATA[<p>@AlexT<br />
According to the error message I think that you have not added the JavaScript code as resource file into your project. Instead XCode tries to compile and link the JavaScript code. But this is wrong.</p>
<p>What you have to do is to make sure that the JavaScript file is treated as resource file in your XCode project. To do this, look in  XCode in the sidebar of the project window for the &#8220;Targets&#8221; section. Within the &#8220;Targets&#8221; section you&#8217;ll find your Target and within the target you&#8217;ll find several task which have to be done to create your application. I assume that the JavaScript file was added to the &#8220;Compile Sources&#8221; task. But it should have bee added to the &#8220;Copy Bundle Resources&#8221; task. So what you need to do is to open &#8220;Compile sources&#8221;, find the JavaScript file and then drag it into &#8220;Copy Bundle Resources&#8221;.</p>
<p>This should solve your problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2022</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2022</guid>
		<description>I succeeded to send the parameter. It&#039;s shown with NSLog if the line is at the beginning of the method (perhaps is altered later). Bu, still it doesn&#039;t do the highlight stuff. So, the method is triggered as it should, but has no effect on text. I also get the following warning : &quot;no rule to process file &#039;$(PROJECT_DIR)/../SearchWebView.js&#039; of type sourcecode.javascript for architecture i386&quot;. Please help.  Thanks in advance!</description>
		<content:encoded><![CDATA[<p>I succeeded to send the parameter. It&#8217;s shown with NSLog if the line is at the beginning of the method (perhaps is altered later). Bu, still it doesn&#8217;t do the highlight stuff. So, the method is triggered as it should, but has no effect on text. I also get the following warning : &#8220;no rule to process file &#8216;$(PROJECT_DIR)/../SearchWebView.js&#8217; of type sourcecode.javascript for architecture i386&#8243;. Please help.  Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2021</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2021</guid>
		<description>It seems that i have problems with the Objective-C part. I have a WebViewController which loads a WebView from NIB (tailored in IB); the h. and m. files of SearchWeb are written exactly as yours. It looks like the keyword I get from UITextField -from WebView - is not passed in the &#039;highlighting&#039; method from SearchWeb.m. The keyword from textfield is put in a string which is sent as a parameter when the highlighting method is invoked. I have put an NSLog  to check the &#039;str&#039; and it doesn&#039;t contain in the end what it should.  I am wondering what am I missing?</description>
		<content:encoded><![CDATA[<p>It seems that i have problems with the Objective-C part. I have a WebViewController which loads a WebView from NIB (tailored in IB); the h. and m. files of SearchWeb are written exactly as yours. It looks like the keyword I get from UITextField -from WebView &#8211; is not passed in the &#8216;highlighting&#8217; method from SearchWeb.m. The keyword from textfield is put in a string which is sent as a parameter when the highlighting method is invoked. I have put an NSLog  to check the &#8217;str&#8217; and it doesn&#8217;t contain in the end what it should.  I am wondering what am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2003</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 16 Mar 2010 18:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2003</guid>
		<description>@AlexT
I don&#039;t know what exactly you&#039;re trying to do. But my code from above should give you an idea how to create a new span element and how to add text to it. In my case I search for the keyword in all text nodes and when found, I split up the text node into three pieces (the text before the keyword, the keyword itself and the text after the keyword). The keyword part of the text is now used as the child node of the newly created SPAN element, and the SPAN element will be then inserted in between the two remaining parts of the text.

If you want to add additional SPAN nodes, you can do the same: just split the text nodes
into two parts and insert a new SPAN element between the two parts, just like this is done above.</description>
		<content:encoded><![CDATA[<p>@AlexT<br />
I don&#8217;t know what exactly you&#8217;re trying to do. But my code from above should give you an idea how to create a new span element and how to add text to it. In my case I search for the keyword in all text nodes and when found, I split up the text node into three pieces (the text before the keyword, the keyword itself and the text after the keyword). The keyword part of the text is now used as the child node of the newly created SPAN element, and the SPAN element will be then inserted in between the two remaining parts of the text.</p>
<p>If you want to add additional SPAN nodes, you can do the same: just split the text nodes<br />
into two parts and insert a new SPAN element between the two parts, just like this is done above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by AlexT</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-1/#comment-2001</link>
		<dc:creator>AlexT</dc:creator>
		<pubDate>Tue, 16 Mar 2010 14:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-2001</guid>
		<description>I would like to put each word in a span (not only a keyword). How should I do it? Thanks.</description>
		<content:encoded><![CDATA[<p>I would like to put each word in a span (not only a keyword). How should I do it? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adding any kinds of UI elements into a UINavigationBar by Techno</title>
		<link>http://www.icab.de/blog/2009/10/13/adding-any-kinds-of-ui-elements-into-a-uinavigationbar/comment-page-1/#comment-1973</link>
		<dc:creator>Techno</dc:creator>
		<pubDate>Sat, 13 Mar 2010 11:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=79#comment-1973</guid>
		<description>Great help ! Keep up. thanks.</description>
		<content:encoded><![CDATA[<p>Great help ! Keep up. thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Modules for iCab Mobile by Rowan Pope</title>
		<link>http://www.icab.de/blog/2010/02/17/modules-for-icab-mobile/comment-page-1/#comment-1961</link>
		<dc:creator>Rowan Pope</dc:creator>
		<pubDate>Thu, 11 Mar 2010 11:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=118#comment-1961</guid>
		<description>This is an absolutely awesome app, I love it. I hope your well on the way to an iPad version, I&#039;ll buy it as soon as it&#039;s out!</description>
		<content:encoded><![CDATA[<p>This is an absolutely awesome app, I love it. I hope your well on the way to an iPad version, I&#8217;ll buy it as soon as it&#8217;s out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on URL filtering for UIWebView on the iPhone by Dj</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-1960</link>
		<dc:creator>Dj</dc:creator>
		<pubDate>Thu, 11 Mar 2010 07:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-1960</guid>
		<description>I am implementing an application that will use safari to browse the web. My module is to save the webpage appearing on the browser before the user quits the app. So for this I created an instance of NSURLConnection and invoked the initWithRequest method. The delegate methods are getting called properly. But when I try to fetch the cached response I am getting nil object . After observing closely , I found that -(NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse 
method is invoked properly. But after I save the cached response storeCachedResponse method , it&#039;s isnt getting stored in the cache.</description>
		<content:encoded><![CDATA[<p>I am implementing an application that will use safari to browse the web. My module is to save the webpage appearing on the browser before the user quits the app. So for this I created an instance of NSURLConnection and invoked the initWithRequest method. The delegate methods are getting called properly. But when I try to fetch the cached response I am getting nil object . After observing closely , I found that -(NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse<br />
method is invoked properly. But after I save the cached response storeCachedResponse method , it&#8217;s isnt getting stored in the cache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on URL filtering for UIWebView on the iPhone by Alexander</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-1951</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 09 Mar 2010 17:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-1951</guid>
		<description>@Dj
I don&#039;t know what exactly you&#039;re doing. I think you could have done something wrong, or maybe my solution doesn&#039;t match to your problem.
You can send me an example  project  by email and I&#039;ll check what&#039;s going wrong.</description>
		<content:encoded><![CDATA[<p>@Dj<br />
I don&#8217;t know what exactly you&#8217;re doing. I think you could have done something wrong, or maybe my solution doesn&#8217;t match to your problem.<br />
You can send me an example  project  by email and I&#8217;ll check what&#8217;s going wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on URL filtering for UIWebView on the iPhone by Dj</title>
		<link>http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/comment-page-1/#comment-1949</link>
		<dc:creator>Dj</dc:creator>
		<pubDate>Tue, 09 Mar 2010 13:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=35#comment-1949</guid>
		<description>I was trying to cache a webpage but noticed that &quot;- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request
&quot; method doesn&#039;t store the cached response. I have customized the NSURLCache the way you have mentioned but still the cached response isn&#039;t getting stored. As the cached response isn&#039;t getting stored while retrieving the cache I am getting data as nil. What could be a possible solution to this issue..</description>
		<content:encoded><![CDATA[<p>I was trying to cache a webpage but noticed that &#8220;- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request<br />
&#8221; method doesn&#8217;t store the cached response. I have customized the NSURLCache the way you have mentioned but still the cached response isn&#8217;t getting stored. As the cached response isn&#8217;t getting stored while retrieving the cache I am getting data as nil. What could be a possible solution to this issue..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
