<?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: Xcode Code Completion Macros</title>
	<atom:link href="http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html</link>
	<description>Tips and Tricks for iPhone developers</description>
	<lastBuildDate>Thu, 29 Jul 2010 23:00:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: AliGator</title>
		<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/comment-page-1#comment-9346</link>
		<dc:creator>AliGator</dc:creator>
		<pubDate>Thu, 04 Feb 2010 09:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1648#comment-9346</guid>
		<description>There is a bug on TextMacros in the latest versions of Xcode (I encourage you to send a bugreport to Apple as I did)
In fact, only TextMacros that have the value &quot;YES&quot; for the key &quot;OnlyAtBOL&quot; will work. If this key is not present (or set to NO), the macro will not respond to autocompletion.

Actually, the new &quot;OnlyAtBOL&quot; key means &quot;Only at Beginning Of Line&quot;, so the autocompletion for this macro will only work if it is triggered in the beggining of a line. But in fact, quite every macro I need everyday comply to this constraint (ifelse, nslog, nss, ...) so this is acceptable.

If you want those macros (that does not work because of the lack of OnlyAtBOL set to YES) to work again, you need to add/override their specifications in your &quot;Application Support&quot; directory (in a custom TextMacro file that override them), until the Xcode team fixes that bug.</description>
		<content:encoded><![CDATA[<p>There is a bug on TextMacros in the latest versions of Xcode (I encourage you to send a bugreport to Apple as I did)<br />
In fact, only TextMacros that have the value &#8220;YES&#8221; for the key &#8220;OnlyAtBOL&#8221; will work. If this key is not present (or set to NO), the macro will not respond to autocompletion.</p>
<p>Actually, the new &#8220;OnlyAtBOL&#8221; key means &#8220;Only at Beginning Of Line&#8221;, so the autocompletion for this macro will only work if it is triggered in the beggining of a line. But in fact, quite every macro I need everyday comply to this constraint (ifelse, nslog, nss, &#8230;) so this is acceptable.</p>
<p>If you want those macros (that does not work because of the lack of OnlyAtBOL set to YES) to work again, you need to add/override their specifications in your &#8220;Application Support&#8221; directory (in a custom TextMacro file that override them), until the Xcode team fixes that bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/comment-page-1#comment-9332</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Thu, 04 Feb 2010 01:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1648#comment-9332</guid>
		<description>Ok, got it to work.

I had to go here:

/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources/

copy C.xctxtmacro from that directory to ~/Library/Application Support/Developer/Shared/Xcode/Specifications/

and then it all worked!

Very nice.

Julian</description>
		<content:encoded><![CDATA[<p>Ok, got it to work.</p>
<p>I had to go here:</p>
<p>/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources/</p>
<p>copy C.xctxtmacro from that directory to ~/Library/Application Support/Developer/Shared/Xcode/Specifications/</p>
<p>and then it all worked!</p>
<p>Very nice.</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian</title>
		<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/comment-page-1#comment-9330</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Thu, 04 Feb 2010 01:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1648#comment-9330</guid>
		<description>I wonder what you need to do to enable this - I am using XCode 3.2.1, and it doesn&#039;t behave in this fashion.

If I type ifelse, then press ctrl-., it simply beeps at me. f5 or escape tells me no completions.

It will work for regular codesense eg. nss will bring up a list of matching symbols, but only because the first 3 letters match NSString. As such, nsms won&#039;t work, you need to do nsmu. The putative &#039;if&#039; macro does nothing either.

Curiously though, log does work as a macro! It gives me NSLog(@&quot;&quot;);

The menu of text macros is there - they&#039;re just largely inaccessible because they&#039;re deep in the menu, and they don&#039;t respond to their macro shortcut letters.

Lastly, ~/Library/Application Support/Developer/Shared/Specifications/ doesn&#039;t exist on my system, so I don&#039;t even know where they are. Nothing  matching xctxtmacro is present on my system, according to spotlight.

Any hints?

Julian</description>
		<content:encoded><![CDATA[<p>I wonder what you need to do to enable this &#8211; I am using XCode 3.2.1, and it doesn&#8217;t behave in this fashion.</p>
<p>If I type ifelse, then press ctrl-., it simply beeps at me. f5 or escape tells me no completions.</p>
<p>It will work for regular codesense eg. nss will bring up a list of matching symbols, but only because the first 3 letters match NSString. As such, nsms won&#8217;t work, you need to do nsmu. The putative &#8216;if&#8217; macro does nothing either.</p>
<p>Curiously though, log does work as a macro! It gives me NSLog(@&#8221;");</p>
<p>The menu of text macros is there &#8211; they&#8217;re just largely inaccessible because they&#8217;re deep in the menu, and they don&#8217;t respond to their macro shortcut letters.</p>
<p>Lastly, ~/Library/Application Support/Developer/Shared/Specifications/ doesn&#8217;t exist on my system, so I don&#8217;t even know where they are. Nothing  matching xctxtmacro is present on my system, according to spotlight.</p>
<p>Any hints?</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mr. Orange</title>
		<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/comment-page-1#comment-1755</link>
		<dc:creator>mr. Orange</dc:creator>
		<pubDate>Fri, 08 May 2009 10:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1648#comment-1755</guid>
		<description>Instead of pressing F5 to bring up a list of options, you could also use ESC (which is, in my opinion, easier to find on a keyboard when you are typing with a blindfold on ;-)

Also, you could try F5 or ESC with other code as well, for example, if you type &#039;UIV&#039; and press ESC you will be presented a list of classes that start with UIV.</description>
		<content:encoded><![CDATA[<p>Instead of pressing F5 to bring up a list of options, you could also use ESC (which is, in my opinion, easier to find on a keyboard when you are typing with a blindfold on ;-)</p>
<p>Also, you could try F5 or ESC with other code as well, for example, if you type &#8216;UIV&#8217; and press ESC you will be presented a list of classes that start with UIV.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AliGator</title>
		<link>http://iPhoneDeveloperTips.com/xcode/xcode-code-completion-macros.html/comment-page-1#comment-281</link>
		<dc:creator>AliGator</dc:creator>
		<pubDate>Sun, 08 Mar 2009 03:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1648#comment-281</guid>
		<description>Note that you also can create your own text macros, which can be very useful.
For example I created a TextMacro that insert touchBegan/touchMoved/touchEnded/touchCancelled definitions in my code so I can generate the template of those methods in a snap.

Creation a a custom xctxtmacro file to define custom TextMacros is explained in the Xcode documentation (see link in the article) but there is a typo in the path they provide: you have to put your xctxtmacro file in &quot;~/Library/Application Support/Developer/Shared/Xcode/Specifications/&quot; and not in &quot;~/Library/Application Support/Developer/Shared/Specifications/&quot; otherwise it won&#039;t work.</description>
		<content:encoded><![CDATA[<p>Note that you also can create your own text macros, which can be very useful.<br />
For example I created a TextMacro that insert touchBegan/touchMoved/touchEnded/touchCancelled definitions in my code so I can generate the template of those methods in a snap.</p>
<p>Creation a a custom xctxtmacro file to define custom TextMacros is explained in the Xcode documentation (see link in the article) but there is a typo in the path they provide: you have to put your xctxtmacro file in &#8220;~/Library/Application Support/Developer/Shared/Xcode/Specifications/&#8221; and not in &#8220;~/Library/Application Support/Developer/Shared/Specifications/&#8221; otherwise it won&#8217;t work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
