<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
 	<channel>
		<title>Objective-C Memo | DotMac</title>
		<link>http://homepage.mac.com/mnishikata/objective-c_memo/</link>
		<description></description>
		<language>ja</language>
		<lastBuildDate>Wed, 15 Aug 2007 12:20:15 +1200</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Sandvox 1.2.2</generator>
		<item>
			<title>SmartRules</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/smartrules.html</link>
			<description>
&lt;p&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Hiragino Kaku Gothic Pro;"&gt;TimeDrawer に、Mail.app の振り分けルールのような「ルール」を実装。現在テスト中。オブジェクトコントローラの使い方とか、正しい（正答）かどうかわからないのですが、とにかくバインディングとNSPredicateで結構簡単にできました。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Hiragino Kaku Gothic Pro';"&gt;コンポーネント&lt;a href="../_Media/smartrules.zip"&gt;SmartRules&lt;/a&gt; をご自由に利用下さい。&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;a href="../_Media/smartrules.zip"&gt;Free download : SmartRules&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;br class="webkit-block-placeholder" /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Times; font-size: 16px;"&gt;&lt;img src="http://homepage.mac.com/mnishikata/_Media/smartrules-2_textmedium.jpeg" alt="SmartRules" style="outline:none;" /&gt;&lt;span style="font-family: 'Helvetica Neue'; font-size: 12px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Times; font-size: 16px;"&gt;&lt;span style="font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;span style="font-size: 12px;"&gt;smart group, smart folder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
			</description>
			<pubDate>Wed, 15 Aug 2007 11:45:35 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/smartrules.html</guid>
		</item>
		<item>
			<title>FSLogger</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/fslogger.html</link>
			<description>
&lt;p&gt;http://www.osxbook.com/software/fslogger/&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class="webkit-block-placeholder" /&gt;
&lt;/p&gt;
&lt;p&gt;Spotlight ( mdimport )がファイルの更新を監視しているのはこの機構を使用していると思われる。10.5 では一般向けのAPI が実装される模様。
&lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 21:52:43 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/fslogger.html</guid>
		</item>
		<item>
			<title>Vector</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/vector.html</link>
			<description>
&lt;p&gt;Vector, Mac用のアプリケーション紹介用サイトとしては既に死んでいます。登録に１ヶ月必要という、なんともな仕様。そんなサイトで、JPO mdimporter がMacビジネス部門第３位でした。多分ダウンロードした人の99%はウインドウズ用のソフトウェアだと思っているはず。&lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 21:45:10 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/vector.html</guid>
		</item>
		<item>
			<title>Get kMDItemTextContent Value</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/get_kmditemtextcontent_valu.html</link>
			<description>
&lt;p&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;You cannot retrieve kMDItemTextContent value from Spotlight query result.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;Using these method below, mdimporter plugins can be used as viewer plugins for all the documents that the plugins support.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;mdimporterをプラグインとして使用し、kMDItemTextContentの値を取得する&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;------------ &lt;/span&gt;SpotlightTextContentRetriever.h&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@interface&lt;/span&gt; SpotlightTextContentRetriever : NSObject {&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)initialize;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSMutableArray* )metaDataOfFileAtPath:(NSString*)targetFilePath;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSString* )textContentOfFileAtPath:(NSString*)targetFilePath;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSMutableDictionary*)executeMDImporterAtPath:(NSString*)mdimportPath forPath:(NSString*)path uti:(NSString*)uti;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;@end&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;------------ &lt;/span&gt;SpotlightTextContentRetriever.m&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//  SpotlightTextContentRetriever.m&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//  SpotInside&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//  Created by Masatoshi Nishikata on 06/11/22.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//  Copyright 2006 __MyCompanyName__. All rights reserved.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;//&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;/*&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Using codes from Apple's BasicPlugin&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; ----------------------------------&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Description: Basic CFPlugIn sample code shell, Carbon API&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Copyright: &lt;span style="white-space: pre;"&gt;	&lt;/span&gt; © Copyright 2001 Apple Computer, Inc. All rights reserved.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Disclaimer:&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; ("Apple") in consideration of your agreement to the following terms, and your&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; use, installation, modification or redistribution of this Apple software&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; constitutes acceptance of these terms.  If you do not agree with these terms,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; please do not use, install, modify or redistribute this Apple software.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; In consideration of your agreement to abide by the following terms, and subject&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; to these terms, Apple grants you a personal, non-exclusive license, under Apple’s&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; copyrights in this original Apple software (the "Apple Software"), to use,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; reproduce, modify and redistribute the Apple Software, with or without&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; modifications, in source and/or binary forms; provided that if you redistribute&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; the Apple Software in its entirety and without modifications, you must retain&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; this notice and the following text and disclaimers in all such redistributions of&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; the Apple Software.  Neither the name, trademarks, service marks or logos of&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Apple Computer, Inc. may be used to endorse or promote products derived from the&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Apple Software without specific prior written permission from Apple.  Except as&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; expressly stated in this notice, no other rights or licenses, express or implied,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; are granted by Apple herein, including but not limited to any patent rights that&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; may be infringed by your derivative works or by other works in which the Apple&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; Software may be incorporated.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; COMBINATION WITH YOUR PRODUCTS.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt; */&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;#include &amp;lt;Carbon/Carbon.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;#include &amp;lt;CoreFoundation/CoreFoundation.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;#include &amp;lt;CoreFoundation/CFPlugInCOM.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;#import "SpotlightTextContentRetriever.h"&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;typedef&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;struct&lt;/span&gt; PlugInInterfaceStruct {&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;    IUNKNOWN_C_GUTS;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Boolean (*GetMetadataForFile)(&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;* myInstance, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;  CFMutableDictionaryRef attributes, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;  CFStringRef contentTypeUTI,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;  CFStringRef pathToFile);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;} MDImporterInterfaceStruct;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;static&lt;/span&gt; MDImporterInterfaceStruct **mdimporterInterface = &lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;/*&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;typedef&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Boolean (*getMetadataForFileFunction)(void* thisInterface, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt;  CFMutableDictionaryRef attributes, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt;  CFStringRef contentTypeUTI,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt;  CFStringRef pathToFile);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;*/&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@implementation&lt;/span&gt; SpotlightTextContentRetriever&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;static&lt;/span&gt; NSArray* mdimporterArray;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)initialize&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Get and store MDImporter list&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSTask *task = [[NSTask alloc] init];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSPipe *messagePipe = [NSPipe pipe];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task setLaunchPath:&lt;span style="color: rgb(137, 19, 21);"&gt;@"/usr/bin/mdimport"&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task setArguments:[NSArray arrayWithObjects: &lt;span style="color: rgb(137, 19, 21);"&gt;@"-L"&lt;/span&gt; ,&lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;]];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task setStandardError : messagePipe];&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task launch];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task waitUntilExit];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData *messageData = [[messagePipe fileHandleForReading] availableData]; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* message;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;message = [[[NSString alloc] initWithData:messageData&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;										&lt;/span&gt;encoding:NSUTF8StringEncoding] autorelease];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[task release];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Cut unwanted string&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSRange firstReturn = [message rangeOfString:&lt;span style="color: rgb(137, 19, 21);"&gt;@"¥n"&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* arrayStr = [message substringFromIndex:  firstReturn.location&lt;span style="color: rgb(0, 0, 255);"&gt;-1&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Convert string to array&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mdimporterArray =   [[arrayStr propertyList] retain];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;/*&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;// Convert percentage encoded string&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;int hoge;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSMutableArray* array = [NSMutableArray array];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;for( hoge = 0; hoge &amp;lt; [tempArray count]; hoge++ )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSString* aPath = [tempArray objectAtIndex:hoge];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;aPath = [aPath stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[array addObject:aPath ];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mdimporterArray = [[NSArray arrayWithArray: array ] retain];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;*/&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//NSLog(@"mdimporterArray %@", [mdimporterArray description]);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSMutableArray* )metaDataOfFileAtPath:(NSString*)targetFilePath&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Get UTI of the given file&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;targetFilePath = [targetFilePath stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSURL* anUrl = [NSURL URLWithString: targetFilePath];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;FSRef ref;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFURLGetFSRef(anUrl,&amp;amp;ref);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFTypeRef outValue;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;LSCopyItemAttribute (&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt; &amp;amp;ref,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt; kLSRolesAll,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt; kLSItemContentType,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt; &amp;amp;outValue&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt; );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( outValue == &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; ) &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* uti = [NSString stringWithString:outValue];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFRelease(outValue);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//NSLog(@"uti %@",uti);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//----------------&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//Get handlers that can handle the file&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFArrayRef ha = LSCopyAllRoleHandlersForContentType (&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; uti,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; kLSRolesAll&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; );&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSArray* handlerArray = [NSArray arrayWithArray: ha];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFRelease(ha);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//NSLog(@"handlers %@",[handlerArray description]);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//----------------&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//Evaluate&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; hoge;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;for&lt;/span&gt;( hoge = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;; hoge &amp;lt; [mdimporterArray count]; hoge++ )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSString* mdimporterPath = [mdimporterArray objectAtIndex:hoge];&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSBundle* bndl = [NSBundle bundleWithPath: mdimporterPath ];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( bndl != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; piyo;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;for&lt;/span&gt;( piyo = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;; piyo &amp;lt; [handlerArray count]; piyo++ )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;NSString* aHandler = [handlerArray objectAtIndex:piyo];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/span&gt;//NSLog(@"Compareing %@, %@ ",aHandler, [bndl bundleIdentifier]);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [aHandler isEqualToString:[bndl bundleIdentifier] ] )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/span&gt;//NSLog(@"Executing mdimporterPath %@ for targetFilePath %@",mdimporterPath,targetFilePath);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/span&gt;// found one mdimporter&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;NSMutableDictionary* attributes = &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;[SpotlightTextContentRetriever executeMDImporterAtPath:mdimporterPath &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;																&lt;/span&gt;   forPath:targetFilePath&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;																	&lt;/span&gt;   uti:uti];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [attributes objectForKey:kMDItemTextContent] != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; attributes;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;}&lt;/span&gt;else&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/span&gt;//NSLog(@"bndl is null");&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;/*&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;// use text mdimporter if appropriate importer cannot be found&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;///System/Library/Spotlight/RichText.mdimporter&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;//NSLog(@"%@",uti);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSMutableDictionary* attributes = &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[SpotlightTextContentRetriever executeMDImporterAtPath:@"/System/Library/Spotlight/RichText.mdimporter" &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;   forPath:targetFilePath&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt;   uti:uti];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; return attributes;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; */&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;return&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;nil&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSString* )textContentOfFileAtPath:(NSString*)targetFilePath&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSMutableDictionary* attributes = &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[SpotlightTextContentRetriever metaDataOfFileAtPath:targetFilePath];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt; textContent = [attributes objectForKey:kMDItemTextContent];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [textContent isKindOfClass:[NSString class]]  )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/span&gt;//NSLog(@"%@",textContent);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; textContent;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;return&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;nil&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;+(NSMutableDictionary*)executeMDImporterAtPath:(NSString*)mdimportPath forPath:(NSString*)path uti:(NSString*)uti&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mdimportPath = [mdimportPath stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSMutableDictionary* attributes = &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFBundleRef&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;bundle;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFURLRef url = CFURLCreateWithString (&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt; mdimportPath,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;											&lt;/span&gt; );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( url == &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;/*&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSLog(@"start executeMDImporterAtPath");&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSLog(@"Execute GetMetadataForFile");&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSLog(@"uti %@",uti);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSLog(@"path %@",path);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSLog(@"mdimport %@",mdimportPath );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;*/&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Create CFPlugInRef&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFPlugInRef plugin = CFPlugInCreate(&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;, url);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFRelease(url);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; (!plugin)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/span&gt;//NSLog(@"Could not create CFPluginRef.¥n");&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/span&gt;return&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;nil&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//  The plug-in was located. Now locate the interface.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;BOOL&lt;/span&gt; foundInterface = &lt;span style="color: rgb(118, 15, 80);"&gt;NO&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFArrayRef&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;factories;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//  See if this plug-in implements the Test type.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;factories&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= CFPlugInFindFactoriesForPlugInTypeInPlugIn( kMDImporterTypeID, plugin );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//  If there are factories for the Test type, attempt to get the IUnknown interface.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( factories != &lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;CFIndex&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;factoryCount;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;CFIndex&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;index;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;factoryCount&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= CFArrayGetCount( factories );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( factoryCount &amp;gt; &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;for&lt;/span&gt; ( index = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt; ; (index &amp;lt; factoryCount) &amp;amp;&amp;amp; (foundInterface == false) ; index++ )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;CFUUIDRef&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;factoryID;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;/span&gt;//  Get the factory ID for the first location in the array of IDs.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;factoryID = (CFUUIDRef) CFArrayGetValueAtIndex( factories, index );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( factoryID )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;IUnknownVTbl **iunknown;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/span&gt;//  Use the factory ID to get an IUnknown interface. Here the plug-in code is loaded.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;iunknown&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= (IUnknownVTbl **) CFPlugInInstanceCreate( &lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;, factoryID, kMDImporterTypeID );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( iunknown )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;/span&gt;//  If this is an IUnknown interface, query for the test interface.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;(*iunknown)-&amp;gt;QueryInterface( iunknown, CFUUIDGetUUIDBytes( kMDImporterInterfaceID ), (LPVOID *)( &amp;amp;mdimporterInterface ) );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;/span&gt;// Now we are done with IUnknown&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;(*iunknown)-&amp;gt;Release( iunknown );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( mdimporterInterface )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;&lt;/span&gt;//&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;We found the interface we need&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;foundInterface&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= true;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFRelease( factories );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; ( foundInterface == false )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;else&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;attributes = [NSMutableDictionary dictionary];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;path = [path stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/span&gt;//NSLog(@"start getMetadataForFile CFPlugin");&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;(*mdimporterInterface)-&amp;gt;GetMetadataForFile( mdimporterInterface, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;attributes, &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;uti,&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;path);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/span&gt;//NSLog(@"%@",[attributes description]);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;(*mdimporterInterface)-&amp;gt;Release( mdimporterInterface );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Finished&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFRelease( plugin );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;plugin&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= &lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; attributes;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-size: 11px;"&gt;@end&lt;/p&gt;
&lt;br /&gt;
 &lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:53:31 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/get_kmditemtextcontent_valu.html</guid>
		</item>
		<item>
			<title>GetCurrentKeyModifiers( )修飾キーの押され具合をチェック</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/getcurrentkeymodifiers.html</link>
			<description>
&lt;p /&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import &amp;lt;HIToolbox/CarbonEventsCore.h&amp;gt; // with carbon framework&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt; &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;int modKey = GetCurrentKeyModifiers( );&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;alphaLock 0x400&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;controlKey 0x1000&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;optionKey 0x800&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;shiftKey 0x200&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;cmdKey 0x100&lt;/p&gt;
 &lt;p /&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:53:10 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/getcurrentkeymodifiers.html</guid>
		</item>
		<item>
			<title>Play System Sound (SystemSoundPlay)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/play_system_sound_systemsou.html</link>
			<description>
&lt;p /&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;eg.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;SystemSoundPlay(0);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;0:Screen capture sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;1:Completion file movement sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;2:Reversed sound of number 1?&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;3:Volume control sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;4:Something collapsing sound??&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;5:Heavy switching sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;6:Switching sound &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;7:Switching sound 2&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;8:Switching sound 3&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;9:Dragging noise&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;10:Dragging noise 2&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;11:Heavy click sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;12:Similar to 7 but shorter??&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;13:Empty Trash sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;14:Throwing away ??&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;15:Dock item poof sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;16:Move to trash &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;17:Click sound&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;18-21: Sweeping ??&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;22-23: Complete Burning Disk&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;24: Clicking inactive window beep&lt;/p&gt;
&lt;br /&gt;
 &lt;p /&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:52:46 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/play_system_sound_systemsou.html</guid>
		</item>
		<item>
			<title>Get mouse button status マウスボタンの状態をチェックする</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/get_mouse_button_status.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import &amp;lt;HIToolbox/CarbonEventsCore.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;BOOL flag = GetCurrentButtonState();&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:52:21 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/get_mouse_button_status.html</guid>
		</item>
		<item>
			<title>GengoCalendarDate</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/gengocalendardate.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;「平成１８年１月１日」という元号日付をNSStringをNSDateに変える&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(104, 56, 33);"&gt;メソッドです。（別に&lt;/span&gt;NSCalendarDateのエクステンションでなくても構いません&lt;span style="color: rgb(104, 56, 33);"&gt;）&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;これらを使用しています&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;正規表現&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;AGRegex&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;全角半角変換&lt;/p&gt;
&lt;pre&gt;http://blogs.dion.ne.jp/fujidana/&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;
&lt;pre&gt;但し、変換不可能なキャラクタをそのまま返すように&lt;/pre&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#pragma mark other characters&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;} &lt;span style="color: rgb(118, 15, 80);"&gt;else&lt;/span&gt; {&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/span&gt;//if (passFwMask &amp;amp; FWHWOtherMask || passHwMask &amp;amp; FWHWOtherMask) {&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;newChar[j--] = c;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;span style="color: rgb(35, 110, 37);"&gt;//}&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;}&lt;/p&gt;
&lt;pre&gt;としました。&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import &amp;lt;Cocoa/Cocoa.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@interface&lt;/span&gt; NSCalendarDate (GengoCalendarDate)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;+(NSDate*)dateWithGengouString:(NSString*)gengou;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-family: Osaka; font-size: 11px;"&gt;@end&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;--------------------------------------------------------&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;//&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;//  GengoCalendarDate.m&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;//  GengoCalendarDate　&lt;span style="font: normal normal normal 12px/normal Hiragino Mincho Pro; color: rgb(0, 0, 0); font-family: 'Hiragino Mincho Pro'; font-size: 10px;"&gt;&lt;tt&gt;エンコードはMacOS日本語にしてください&lt;/tt&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import "GengoCalendarDate.h"&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import "NSString_FullwidthHalfwidth.h"&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import "AGRegex.h"&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@implementation&lt;/span&gt; NSCalendarDate (GengoCalendarDate)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)yearOfHeisei &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(35, 110, 37);"&gt;//2000 = 12&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; year = [&lt;span style="color: rgb(118, 15, 80);"&gt;super&lt;/span&gt; yearOfCommonEra];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; (year -= &lt;span style="color: rgb(0, 0, 255);"&gt;1988&lt;/span&gt;);&lt;span style="color: rgb(35, 110, 37);"&gt;//&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;+(NSDate*)dateWithGengouString:(NSString*)gengou&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(35, 110, 37);"&gt;// heisei and showa&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegex* chomp = [AGRegex regexWithPattern:[NSString stringWithCString:&lt;span style="color: rgb(137, 19, 21);"&gt;"¥n| |　"&lt;/span&gt;]];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegex* heisei = [AGRegex regexWithPattern:[NSString stringWithCString:&lt;span style="color: rgb(137, 19, 21);"&gt;"(?&amp;lt;=平成)[0-9]+(?=年)|(?&amp;lt;=平)[0-9]+(?=年)"&lt;/span&gt;]];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegex* showa = [AGRegex regexWithPattern:[NSString stringWithCString:&lt;span style="color: rgb(137, 19, 21);"&gt;"(?&amp;lt;=昭和)[0-9]+(?=年)|(?&amp;lt;=昭)[0-9]+(?=年)"&lt;/span&gt;]];&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegex* tsuki = [AGRegex regexWithPattern:[NSString stringWithCString:&lt;span style="color: rgb(137, 19, 21);"&gt;"[0-9]+(?=月)"&lt;/span&gt;]];&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegex* nichi = [AGRegex regexWithPattern:[NSString stringWithCString:&lt;span style="color: rgb(137, 19, 21);"&gt;"[0-9]+(?=日)"&lt;/span&gt;]];&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;AGRegexMatch* match;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; nen_int, tsuki_int, nichi_int;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;///&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* str = [chomp replaceWithString:&lt;span style="color: rgb(137, 19, 21);"&gt;@""&lt;/span&gt; inString:gengou];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;str = [str halfwidthString];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;match = [heisei findInString:str];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( match != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;nen_int  = [[str substringWithRange: [match range] ] intValue] + &lt;span style="color: rgb(0, 0, 255);"&gt;1988&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/span&gt;else&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;match = [showa findInString:str];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( match != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;nen_int  = [[str substringWithRange: [match range] ] intValue] + &lt;span style="color: rgb(0, 0, 255);"&gt;1925&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;match = [tsuki findInString:str];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( match != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;tsuki_int = [[str substringWithRange: [match range] ] intValue];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;match = [nichi findInString:str];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( match != &lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; )&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;nichi_int = [[str substringWithRange: [match range] ] intValue];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* format = [NSString stringWithFormat:&lt;span style="color: rgb(137, 19, 21);"&gt;@"%d,%d,%d"&lt;/span&gt;,nen_int ,tsuki_int, nichi_int];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSCalendarDate* calenderDate = [NSCalendarDate &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    dateWithString: format &lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    calendarFormat:&lt;span style="color: rgb(137, 19, 21);"&gt;@"%Y,%m,%d"&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;//NSLog(@"%@",[calenderDate descriptionWithCalendarFormat:@"%y/%B/%d/%A"]);&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; (NSDate*)calenderDate;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-family: Osaka; font-size: 11px;"&gt;@end&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:52:06 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/gengocalendardate.html</guid>
		</item>
		<item>
			<title>NSMetadataQuery</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsmetadataquery.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;NSMetadataQuery seems to have bugs and unable to get NSMetadataQueryResultContentRelevanceAttribute value.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;Use MDQueryRef instead.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(104, 56, 33); font-family: Osaka; font-size: 11px;"&gt;#import &amp;lt;Cocoa/Cocoa.h&amp;gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@interface&lt;/span&gt; MyDocument : NSDocument&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;IBOutlet&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt; field;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;MDQueryRef _query;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)search:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(118, 15, 80); font-family: Osaka; font-size: 11px;"&gt;@end&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;---------&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;#import "MyDocument.h"&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;@implementation MyDocument&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;- (id)init&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;    self = [super init];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;    if (self) {&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;     }&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;    return self;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;- (NSString *)windowNibName&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;    return @"MyDocument";&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;- (void)windowControllerDidLoadNib:(NSWindowController *) aController&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;    [super windowControllerDidLoadNib:aController];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt; &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;- (IBAction)search:(id)sender&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;if( [[field stringValue] isEqualToString:@"" ] ) return;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;        NSString *predicateFormat = @"(kMDItemTextContent == \"?%@*\"c) &amp;amp;&amp;amp; (kMDItemContentType != 'com.apple.mail.emlx') &amp;amp;&amp;amp; (kMDItemContentType != 'public.vcard')";&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;_query = MDQueryCreate (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   NULL,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;[NSString stringWithFormat:predicateFormat,[field stringValue]],&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   [NSArray arrayWithObjects:kMDQueryResultContentRelevance,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;									&lt;/span&gt;   kMDItemPath, kMDItemDisplayName, kMDItemFSName,nil ],&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   [NSArray arrayWithObject:kMDQueryResultContentRelevance]&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   );&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;MDQuerySetSearchScope (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;   _query,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;   [NSArray arrayWithObject:kMDQueryScopeComputer ],&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;   0&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;   );&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(finish) name:kMDQueryDidFinishNotification object:_query];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;MDQueryExecute (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;_query,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;kMDQuerySynchronous&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;);&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;-(void)finish&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[[NSNotificationCenter defaultCenter] removeObserver:self&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;name:nil&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;												&lt;/span&gt;  object:_query];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;MDItemRef miref;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFIndex idx;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;idx = MDQueryGetResultCount(_query);&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;CFIndex hoge;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;for( hoge = 0; hoge &amp;lt; idx; hoge++ )&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;miref = MDQueryGetResultAtIndex( _query, hoge);&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSString* name = (NSString*)MDItemCopyAttribute (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt; miref,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt; kMDItemFSName&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; );&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSString* path = (NSString*)MDItemCopyAttribute (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; miref,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; kMDItemPath&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; );&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSString* displayname = (NSString*)MDItemCopyAttribute (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; miref,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; kMDItemDisplayName&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;														&lt;/span&gt; );&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSNumber* score = (NSNumber*)MDQueryGetAttributeValueOfResultAtIndex (&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;																			&lt;/span&gt;  _query,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;																			&lt;/span&gt;  kMDQueryResultContentRelevance,&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;																			&lt;/span&gt;  hoge&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;																			&lt;/span&gt;  );&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;if( score != nil )&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSLog(@"score %f",[score floatValue]);&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;}&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;@end&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:51:27 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsmetadataquery.html</guid>
		</item>
		<item>
			<title>Create Zip file from data which user can unarchive</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/create_zip_file_from_data_w.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;/*&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;When you want to save your document as a Zip file.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;using&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;cocoadev.com&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;http://www.cocoadev.com/index.pl?UsingZipFilesExamples&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;Please change the scratch folder etc to appropriate ones.&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;*/&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;-(void)usageExample&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;// create sample data&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* text = &lt;span style="color: rgb(137, 19, 21);"&gt;@"test"&lt;/span&gt;;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData* data = [text dataUsingEncoding:NSUTF8StringEncoding];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Zip test 1&lt;/