<?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 on: MGTemplateEngine &#8211; Templates with Cocoa</title>
	<atom:link href="http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/feed" rel="self" type="application/rss+xml" />
	<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa</link>
	<description>Modesty is Lying</description>
	<lastBuildDate>Sun, 21 Mar 2010 21:56:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Reza Jelveh</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-42393</link>
		<dc:creator>Reza Jelveh</dc:creator>
		<pubDate>Tue, 09 Mar 2010 17:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-42393</guid>
		<description>hey man!
thanks for the project but you have a 64-bit issue in the ICUTemplateMatcher.
you should use NSUInteger for location just like NSRange does. int can&#039;t hold the NSNotFound which is NSIntegerMax which leads to an infinite loop on 64-bit binaries.

regards,
reza


diff --git a/Classes/MGTemplateEngine/ICUTemplateMatcher.m b/Classes/MGTemplateEngine/ICUTemplateMatcher.m
index dbeb49a..3fe8112 100644
--- a/Classes/MGTemplateEngine/ICUTemplateMatcher.m
+++ b/Classes/MGTemplateEngine/ICUTemplateMatcher.m
@@ -151,7 +151,7 @@
        NSString *argsPattern = @&quot;\&quot;(.*?)(?&lt;!\\\\)\&quot;&#124;&#039;(.*?)(?&lt;!\\\\)&#039;&#124;(\\S+)&quot;;
        NSMutableArray *args = [NSMutableArray array];
        
-       int location = 0;
+    NSUInteger location = 0;
        while (location != NSNotFound) {
                NSRange searchRange  = NSMakeRange(location, [argString length] - location);
                NSRange entireRange = [argString rangeOfRegex:argsPattern options:RKLNoOptions</description>
		<content:encoded><![CDATA[<p>hey man!<br />
thanks for the project but you have a 64-bit issue in the ICUTemplateMatcher.<br />
you should use NSUInteger for location just like NSRange does. int can&#8217;t hold the NSNotFound which is NSIntegerMax which leads to an infinite loop on 64-bit binaries.</p>
<p>regards,<br />
reza</p>
<p>diff &#8211;git a/Classes/MGTemplateEngine/ICUTemplateMatcher.m b/Classes/MGTemplateEngine/ICUTemplateMatcher.m<br />
index dbeb49a..3fe8112 100644<br />
&#8212; a/Classes/MGTemplateEngine/ICUTemplateMatcher.m<br />
+++ b/Classes/MGTemplateEngine/ICUTemplateMatcher.m<br />
@@ -151,7 +151,7 @@<br />
        NSString *argsPattern = @&#8221;\&#8221;(.*?)(?&lt;!\\\\)\&quot;|&#039;(.*?)(?&lt;!\\\\)&#039;|(\\S+)&quot;;<br />
        NSMutableArray *args = [NSMutableArray array];</p>
<p>-       int location = 0;<br />
+    NSUInteger location = 0;<br />
        while (location != NSNotFound) {<br />
                NSRange searchRange  = NSMakeRange(location, [argString length] &#8211; location);<br />
                NSRange entireRange = [argString rangeOfRegex:argsPattern options:RKLNoOptions</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Audacious Software: Weblog &#187; Blog Archive &#187; Codex UI updates &#38; preview</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41968</link>
		<dc:creator>Audacious Software: Weblog &#187; Blog Archive &#187; Codex UI updates &#38; preview</dc:creator>
		<pubDate>Mon, 11 Jan 2010 23:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41968</guid>
		<description>[...] engine implemented for testing that I will either improve or replace. I would like to integrate MGTemplateEngine as a replacement, but I’ll need to see how much of it must be rewritten for Tiger.) This [...]</description>
		<content:encoded><![CDATA[<p>[...] engine implemented for testing that I will either improve or replace. I would like to integrate MGTemplateEngine as a replacement, but I’ll need to see how much of it must be rewritten for Tiger.) This [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MGTemplateEngine at Under The Bridge</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41952</link>
		<dc:creator>MGTemplateEngine at Under The Bridge</dc:creator>
		<pubDate>Thu, 07 Jan 2010 06:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41952</guid>
		<description>[...] starters, here is MGTemplateEngine for your Cocoa output processing [...]</description>
		<content:encoded><![CDATA[<p>[...] starters, here is MGTemplateEngine for your Cocoa output processing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Garbers</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41868</link>
		<dc:creator>Jeff Garbers</dc:creator>
		<pubDate>Mon, 30 Nov 2009 22:12:21 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41868</guid>
		<description>Matt, please add my thanks to the many above for making this available.  

You mention that the engine is suitable for HTML generation. Do you know of an existing filter for replacing characters like &#039;&lt;&#039; and &#039;&amp;&#039; in variables with the equivalent HTML entities?</description>
		<content:encoded><![CDATA[<p>Matt, please add my thanks to the many above for making this available.  </p>
<p>You mention that the engine is suitable for HTML generation. Do you know of an existing filter for replacing characters like &#8216;&lt;&#039; and &#039;&amp;&#039; in variables with the equivalent HTML entities?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe Regenass</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41449</link>
		<dc:creator>Philippe Regenass</dc:creator>
		<pubDate>Sat, 17 Oct 2009 20:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41449</guid>
		<description>Hi Matt
Thx for your great work!

I have question with HTML Template:
I have for loop with  and  inside. Engine breaks by &lt;/.. tags. How can I fix that? I have tryed to change /for to endFor in variables without successes.

Bests from Switzerland (Snow falls... :-(    )

Philippe</description>
		<content:encoded><![CDATA[<p>Hi Matt<br />
Thx for your great work!</p>
<p>I have question with HTML Template:<br />
I have for loop with  and  inside. Engine breaks by &lt;/.. tags. How can I fix that? I have tryed to change /for to endFor in variables without successes.</p>
<p>Bests from Switzerland (Snow falls&#8230; :-(    )</p>
<p>Philippe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dongnak lee</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41374</link>
		<dc:creator>dongnak lee</dc:creator>
		<pubDate>Mon, 31 Aug 2009 06:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41374</guid>
		<description>I found two memory leaks.

consider following patch.

diff libs/MGTemplateEngine/MGTemplateEngine.m MGTemplateEngine/MGTemplateEngine.m
109c109
 	self.matcher = nil;
Common subdirectories: libs/MGTemplateEngine/MGTemplateEngine.xcodeproj and MGTemplateEngine/MGTemplateEngine.xcodeproj
diff libs/MGTemplateEngine/MGTemplateStandardMarkers.m MGTemplateEngine/MGTemplateStandardMarkers.m
615a616
&gt; 	[cycles release];</description>
		<content:encoded><![CDATA[<p>I found two memory leaks.</p>
<p>consider following patch.</p>
<p>diff libs/MGTemplateEngine/MGTemplateEngine.m MGTemplateEngine/MGTemplateEngine.m<br />
109c109<br />
 	self.matcher = nil;<br />
Common subdirectories: libs/MGTemplateEngine/MGTemplateEngine.xcodeproj and MGTemplateEngine/MGTemplateEngine.xcodeproj<br />
diff libs/MGTemplateEngine/MGTemplateStandardMarkers.m MGTemplateEngine/MGTemplateStandardMarkers.m<br />
615a616<br />
&gt; 	[cycles release];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julio Barros</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41330</link>
		<dc:creator>Julio Barros</dc:creator>
		<pubDate>Wed, 12 Aug 2009 13:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41330</guid>
		<description>This is great.  I&#039;ve been looking for something like this.</description>
		<content:encoded><![CDATA[<p>This is great.  I&#8217;ve been looking for something like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-41206</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 15 Jul 2009 13:22:18 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-41206</guid>
		<description>Matt,
What part of this engine requires Leopard? Would it be a simple job to rewrite so that the code will also run on Tiger (developed/compiled on Leopard), or are there core parts of the application that means it will not be able to work on Tiger at all?</description>
		<content:encoded><![CDATA[<p>Matt,<br />
What part of this engine requires Leopard? Would it be a simple job to rewrite so that the code will also run on Tiger (developed/compiled on Leopard), or are there core parts of the application that means it will not be able to work on Tiger at all?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Puddn</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-39876</link>
		<dc:creator>Puddn</dc:creator>
		<pubDate>Wed, 29 Oct 2008 02:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-39876</guid>
		<description>Matt, been looking at the engine and I can&#039;t figure one thing out. Is this possible? 
{% var exists/has data != nil %}
...
{% /if %}

Thanks</description>
		<content:encoded><![CDATA[<p>Matt, been looking at the engine and I can&#8217;t figure one thing out. Is this possible?<br />
{% var exists/has data != nil %}<br />
&#8230;<br />
{% /if %}</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Legend Gemmell</title>
		<link>http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/comment-page-1#comment-39848</link>
		<dc:creator>Matt Legend Gemmell</dc:creator>
		<pubDate>Tue, 21 Oct 2008 19:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://mattgemmell.com/?p=856#comment-39848</guid>
		<description>Hi all,

MGTemplateEngine has been updated in the repository so that it should now build on iPhone. If you use the ICUTemplateMatcher matcher (the default one used in the sample code), you should be able to link against the libicucore library for iPhone builds. That library is here:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
iPhoneOS2.1.sdk/usr/lib/libicucore.A.dylib</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>MGTemplateEngine has been updated in the repository so that it should now build on iPhone. If you use the ICUTemplateMatcher matcher (the default one used in the sample code), you should be able to link against the libicucore library for iPhone builds. That library is here:</p>
<p>/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/<br />
iPhoneOS2.1.sdk/usr/lib/libicucore.A.dylib</p>
]]></content:encoded>
	</item>
</channel>
</rss>
