<?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;/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;/*&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="white-space: pre;"&gt;	&lt;/span&gt;NSData* convertedData = [self zip:data];&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="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="white-space: pre;"&gt;	&lt;/span&gt;[convertedData writeToFile:[NSHomeDirectory() stringByAppendingPathComponent: @"Desktop/zip result"] atomically:YES];&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;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="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 2&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;NSFileWrapper* zipwrap = [[[NSFileWrapper alloc] initDirectoryWithFileWrappers:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt; ] autorelease];&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;[zipwrap addRegularFileWithContents:data   preferredFilename:&lt;span style="color: rgb(137, 19, 21);"&gt;@"data1"&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;[zipwrap addRegularFileWithContents:data   preferredFilename:&lt;span style="color: rgb(137, 19, 21);"&gt;@"data2"&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;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData* convertedData = [&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt; zip:zipwrap];&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;[convertedData writeToFile:[NSHomeDirectory() stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/zip result"&lt;/span&gt;] atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;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;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;// Unzip&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;NSFileWrapper* wrapper = [&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt; unzip:convertedData];&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;if&lt;/span&gt;( [wrapper isRegularFile] )&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(137, 19, 21); 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;NSLog(&lt;/span&gt;@"this is a regular file wrapper"&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-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(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; color: rgb(137, 19, 21); 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;NSLog(&lt;/span&gt;@"this is a directory wrapper"&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-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="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;NSDictionary* regularFileWrappers = [wrapper fileWrappers];&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;NSLog(&lt;span style="color: rgb(137, 19, 21);"&gt;@"contains %@"&lt;/span&gt;, [[regularFileWrappers allKeys] description] );&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;[wrapper  writeToFile:[NSHomeDirectory() stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/unzip result"&lt;/span&gt;] atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt; updateFilenames:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;/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(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-(NSData*)zip:(&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)raw &lt;/span&gt;//raw must be NSData or NSFileWrapper&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;NSString* scratchFolder =[NSHomeDirectory() stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/"&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;NSString* sourceFilename = &lt;span style="color: rgb(137, 19, 21);"&gt;@"data"&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* targetFilename = &lt;span style="color: rgb(137, 19, 21);"&gt;@"zipped data"&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* sourcePath =[scratchFolder stringByAppendingPathComponent: sourceFilename];&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* targetPath =[scratchFolder stringByAppendingPathComponent: targetFilename];&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;span style="color: rgb(118, 15, 80);"&gt;BOOL&lt;/span&gt; flag = NO;&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;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [raw isKindOfClass:[NSData class]] )&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;flag = [raw writeToFile:sourcePath atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;span style="color: rgb(118, 15, 80);"&gt;else&lt;/span&gt; &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [raw isKindOfClass:[NSFileWrapper class]] )&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;flag = [raw writeToFile:sourcePath atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt; updateFilenames:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( flag == &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-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(137, 19, 21); 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;NSLog(&lt;/span&gt;@"Fail to write."&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-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;return NULL;&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;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;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;/* Assumes sourcePath and targetPath are both&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="white-space: pre;"&gt;		&lt;/span&gt;valid, standardized paths. */&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;//----------------&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;// Create the zip task&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;NSTask * backupTask = [[NSTask alloc] init];&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;[backupTask setLaunchPath:&lt;span style="color: rgb(137, 19, 21);"&gt;@"/usr/bin/ditto"&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;[backupTask setArguments:&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;[NSArray arrayWithObjects:&lt;span style="color: rgb(137, 19, 21);"&gt;@"-c"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"-k"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"-X"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"--rsrc"&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;sourcePath, targetPath, &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; 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;// Launch it and wait for execution&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;[backupTask launch];&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;[backupTask waitUntilExit];&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;// Handle the task's termination status&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; ([backupTask terminationStatus] != &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-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(137, 19, 21); 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;NSLog(&lt;/span&gt;@"Sorry, didn't work."&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-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;return NULL;&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;// You *did* remember to wash behind your ears ...&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;// ... right?&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;[backupTask release];&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;NSData* convertedData = [[[NSData alloc] initWithContentsOfFile:targetPath] autorelease];&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;//delete scratch&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;[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceDestroyOperation&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;source:scratchFolder&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;destination:&lt;span style="color: rgb(137, 19, 21);"&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;  files:[NSArray arrayWithObjects:sourceFilename, targetFilename,&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-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;						&lt;/span&gt;tag:&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-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;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; convertedData;&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;-(NSFileWrapper*)unzip:(NSData*)zipData&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;NSString* scratchFolder =[NSHomeDirectory() &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;stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/"&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* sourceFilename = &lt;span style="color: rgb(137, 19, 21);"&gt;@"zipped data"&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* targetFilename = &lt;span style="color: rgb(137, 19, 21);"&gt;@"unzipped folder"&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* sourcePath =[scratchFolder stringByAppendingPathComponent: sourceFilename];&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* targetPath =[scratchFolder stringByAppendingPathComponent: targetFilename];&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;span style="color: rgb(118, 15, 80);"&gt;BOOL&lt;/span&gt; flag = [zipData writeToFile:sourcePath atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( flag == &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-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;NSLog(&lt;span style="color: rgb(137, 19, 21);"&gt;@"error"&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;return NULL;&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;//Unzip&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;//-------------------&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;NSTask *cmnd=[[NSTask alloc] init];&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;[cmnd setLaunchPath:&lt;span style="color: rgb(137, 19, 21);"&gt;@"/usr/bin/ditto"&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;[cmnd setArguments:[NSArray arrayWithObjects:&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(137, 19, 21);"&gt;@"-v"&lt;/span&gt;,&lt;span style="color: rgb(137, 19, 21);"&gt;@"-x"&lt;/span&gt;,&lt;span style="color: rgb(137, 19, 21);"&gt;@"-k"&lt;/span&gt;,&lt;span style="color: rgb(137, 19, 21);"&gt;@"--rsrc"&lt;/span&gt;,sourcePath,targetPath,&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;[cmnd launch];&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;[cmnd waitUntilExit];&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;// Handle the task's termination status&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; ([cmnd terminationStatus] != &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-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(137, 19, 21); 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;NSLog(&lt;/span&gt;@"Sorry, didn't work."&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-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;return NULL;&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;// You *did* remember to wash behind your ears ...&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;// ... right?&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;[cmnd release];&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;//unzip&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;NSArray* contents = [[NSFileManager defaultManager] directoryContentsAtPath:targetPath];&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;NSFileWrapper* wrapper;&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;if&lt;/span&gt;( [contents count] == &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-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* onepath;&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;onepath = [targetPath stringByAppendingPathComponent:[contents lastObject]];&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;NSData* data = [NSData dataWithContentsOfFile:onepath];&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="white-space: pre;"&gt;		&lt;/span&gt;wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:data  ] autorelease];&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="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;span style="color: rgb(118, 15, 80);"&gt;else&lt;/span&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( [contents count] &amp;gt; &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-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;wrapper = [[[NSFileWrapper alloc] initDirectoryWithFileWrappers:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt; ] autorelease];&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;unsigned&lt;/span&gt; hoge;&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;for&lt;/span&gt;( hoge = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;; hoge &amp;lt; [contents count]; hoge++ )&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* onepath;&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* onefilename;&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;onefilename = [contents objectAtIndex:hoge];&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;onepath = [targetPath stringByAppendingPathComponent:onefilename];&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="white-space: pre;"&gt;			&lt;/span&gt;NSData* data = [NSData dataWithContentsOfFile:onepath];&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;[wrapper addRegularFileWithContents:data   preferredFilename:onefilename ];&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; 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;//delete scratch&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;[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceDestroyOperation&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; source:scratchFolder&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;destination:&lt;span style="color: rgb(137, 19, 21);"&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;  files:[NSArray arrayWithObjects:sourceFilename, targetFilename,&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-family: Osaka; font-size: 11px;"&gt;&lt;span style="white-space: pre;"&gt;													&lt;/span&gt;tag:&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-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;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; wrapper;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:50:56 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/create_zip_file_from_data_w.html</guid>
		</item>
		<item>
			<title>Create Zip/ファイルを作成する</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/create_zip.html</link>
			<description>
&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;&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="white-space: pre;"&gt;	&lt;/span&gt;NSString* sourcePath =[NSHomeDirectory() stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/test.txt"&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* targetPath =[NSHomeDirectory() stringByAppendingPathComponent: &lt;span style="color: rgb(137, 19, 21);"&gt;@"Desktop/test.zip"&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;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* 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;&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;[data writeToFile:sourcePath atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&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;/* Assumes sourcePath and targetPath are both&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="white-space: pre;"&gt;	&lt;/span&gt;valid, standardized paths. */&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="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;// Create the zip task&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;NSTask * backupTask = [[NSTask alloc] init];&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;[backupTask setLaunchPath:&lt;span style="color: rgb(137, 19, 21);"&gt;@"/usr/bin/ditto"&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;[backupTask setArguments:&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;[NSArray arrayWithObjects:&lt;span style="color: rgb(137, 19, 21);"&gt;@"-c"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"-k"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"-X"&lt;/span&gt;, &lt;span style="color: rgb(137, 19, 21);"&gt;@"--rsrc"&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;sourcePath, targetPath, &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; 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;// Launch it and wait for execution&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;[backupTask launch];&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;[backupTask waitUntilExit];&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;// Handle the task's termination status&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; ([backupTask terminationStatus] != &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; color: rgb(137, 19, 21); 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;NSLog(&lt;/span&gt;@"Sorry, didn't work."&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-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;// You *did* remember to wash behind your ears ...&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;// ... right?&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;[backupTask release];&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&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:50:32 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/create_zip.html</guid>
		</item>
		<item>
			<title>NSLayoutManager</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nslayoutmanager.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;characterIndexForGlyphAtIndex &lt;span style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&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 Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;かわりに&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;characterRangeForGlyphRange:actualGlyphRange: &lt;span style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;を使うと解決。&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:50:18 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nslayoutmanager.html</guid>
		</item>
		<item>
			<title>Load Nib File/別のNibを読み込む</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/load_nib_filenib.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;(1)Create nib by IB&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;Make File's Owner a Custom Class e.g. HogeClass&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;Name this nib as Hoge.nib in this example.&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;(2)Create these files&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;HogeClass.h&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;HogeClass.m&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;HogeClass.h:&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;IBOutlet id hogeOutlet&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;HogeClass.m:&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;id&lt;/span&gt;)init&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;self&lt;/span&gt; = [&lt;span style="color: rgb(118, 15, 80);"&gt;super&lt;/span&gt; init];&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;if&lt;/span&gt; (&lt;span style="color: rgb(118, 15, 80);"&gt;self&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;// load nib&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;[NSBundle loadNibNamed:&lt;span style="color: rgb(137, 19, 21);"&gt;@"Hoge"&lt;/span&gt;  owner:&lt;span style="color: rgb(118, 15, 80);"&gt;self&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&gt;return&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;self&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-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;と記載&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;(3)From another class, call HogeClass and its nib like this:&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;HogeClass* hogeInstance = [[HogeClass alloc] init];&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;とする。hogeInstanceを介してhogeOutletにアクセスできる。&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:49:22 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/load_nib_filenib.html</guid>
		</item>
		<item>
			<title>Changing documents' creator/クリエータを変更　</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/changing_documents_creator.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;以下アップルのサイトより From Apple's website&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;- (NSDictionary *)fileAttributesToWriteToFile:(NSString *)fullDocumentPath&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;   ofType:(NSString *)documentTypeName&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;saveOperation:(NSSaveOperationType)saveOperationType&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;    NSDictionary *infoPlist = [[NSBundle mainBundle] infoDictionary];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    NSString *creatorCodeString;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    NSArray *documentTypes;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    NSNumber *typeCode, *creatorCode;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    NSMutableDictionary *newAttributes;&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;    typeCode = creatorCode = &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;/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&gt;// creatorCode を（存在すれば）アプリケーションの HFS クリエータコードに&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&gt;// 設定する。&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    creatorCodeString = [infoPlist objectForKey:&lt;span style="color: rgb(137, 19, 21);"&gt;@"CFBundleSignature"&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="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;(creatorCodeString)&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;        creatorCode = [NSNumber&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;            numberWithUnsignedLong:NSHFSTypeCodeFromFileType([NSString&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;            stringWithFormat:&lt;span style="color: rgb(137, 19, 21);"&gt;@"'%@'"&lt;/span&gt;,creatorCodeString])];&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;/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&gt;// 続いて、このタイプに対応する Info.plist ディクショナリエントリを探す。&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&gt;// 関連付けられている最初の HFS タイプコードを（もしあれば）使用する。&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    documentTypes = [infoPlist objectForKey:&lt;span style="color: rgb(137, 19, 21);"&gt;@"CFBundleDocumentTypes"&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="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;(documentTypes)&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;int&lt;/span&gt; i, count = [documentTypes count];&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;for&lt;/span&gt;(i = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;; i &amp;lt; count; i++)&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;            NSString *type = [[documentTypes objectAtIndex:i]&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;                objectForKey:&lt;span style="color: rgb(137, 19, 21);"&gt;@"CFBundleTypeName"&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="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;(type &amp;amp;&amp;amp; [type isEqualToString:documentTypeName])&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;                NSArray *typeCodeStrings = [[documentTypes objectAtIndex:i]&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;                    objectForKey:&lt;span style="color: rgb(137, 19, 21);"&gt;@"CFBundleTypeOSTypes"&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="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;(typeCodeStrings)&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;                    NSString *firstTypeCodeString = [typeCodeStrings&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;                        objectAtIndex:&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-family: Osaka; font-size: 11px;"&gt;                    &lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt; (firstTypeCodeString)&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;                        typeCode = [NSNumber                            numberWithUnsignedLong:&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;NSHFSTypeCodeFromFileType([NSString&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;                           stringWithFormat:&lt;span style="color: rgb(137, 19, 21);"&gt;@"'%@'"&lt;/span&gt;,firstTypeCodeString])];&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;/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;break&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;/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; color: rgb(35, 110, 37); font-family: Osaka; font-size: 11px;"&gt;&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-family: Osaka; font-size: 11px;"&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;(!(typeCode || creatorCode))&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;return&lt;/span&gt; [&lt;span style="color: rgb(118, 15, 80);"&gt;super&lt;/span&gt; fileAttributesToWriteToFile:fullDocumentPath&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;   ofType:documentTypeName saveOperation:saveOperationType];&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;/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&gt;// さもなければ、ディクショナリにタイプとクリエータを追加する。&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    newAttributes = [NSMutableDictionary dictionaryWithDictionary:[&lt;span style="color: rgb(118, 15, 80);"&gt;super&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;        fileAttributesToWriteToFile:fullDocumentPath ofType:documentTypeName&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;  saveOperation:saveOperationType]];&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;if&lt;/span&gt;(typeCode)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;        [newAttributes setObject:typeCode forKey:NSFileHFSTypeCode];&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;if&lt;/span&gt;(creatorCode)&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;        [newAttributes setObject:creatorCode forKey:NSFileHFSCreatorCode];&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;return&lt;/span&gt; newAttributes;&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;}&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:49:02 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/changing_documents_creator.html</guid>
		</item>
		<item>
			<title>Window size auto-save/ウィンドウサイズ保存</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/window_size_auto-save.html</link>
			<description>
&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;[[textView window] setFrameUsingName: &lt;span style="color: rgb(137, 19, 21);"&gt;@"MyDocumentWindow"&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    [[textView window] setFrameAutosaveName: &lt;span style="color: rgb(137, 19, 21);"&gt;@"MyDocumentWindow"&lt;/span&gt;];&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:48:43 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/window_size_auto-save.html</guid>
		</item>
		<item>
			<title>Use Finder alias in Cococa</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/use_finder_alias_in_cococa.html</link>
			<description>
&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 Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;Even link type filewrapper cannot handle finder alias.&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;To handle alias in Cocoa, using &lt;a href="http://homepage.mac.com/nathan_day/%22%20target=%22NewWindow"&gt;Nathan Day's NDAlias&lt;/a&gt;  is easy.&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:48:27 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/use_finder_alias_in_cococa.html</guid>
		</item>
		<item>
			<title>Subcalssing text storage/NSTextStorageのサブクラスを作る</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/subcalssing_text_storagenst.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;&lt;span style="font: normal normal normal 13px/normal Lucida Grande; font-family: 'Lucida Grande';"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;NSTextStorageをサブクラス化するには、以下のようなメソッドを追加しておく必要がある。&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;(www.cocoadev.comより)&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; 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;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)init {&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;self&lt;/span&gt; = [&lt;span style="color: rgb(118, 15, 80);"&gt;super&lt;/span&gt; init];&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;if&lt;/span&gt; (&lt;span style="color: rgb(118, 15, 80);"&gt;self&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;m_attributedString = [[NSMutableAttributedString alloc] init];&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;/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; color: rgb(118, 15, 80); font-family: Osaka; font-size: 11px;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;return&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;self&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-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;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)dealloc&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;    [[NSNotificationCenter defaultCenter] removeObserver:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt;];&lt;/p&gt;
&lt;p style="font: normal normal normal 13px/normal Osaka; font-family: Osaka; font-size: 11px;"&gt;    [m_attributedString release];&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;super&lt;/span&gt; dealloc];&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;&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;- (NSString *)string&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;return&lt;/span&gt; [m_attributedString string];&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;- (NSDictionary *)attributesAtIndex:(&lt;span style="color: rgb(118, 15, 80);"&gt;unsigned&lt;/span&gt;)index effectiveRange:(NSRangePointer)aRange&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;return&lt;/span&gt; [m_attributedString attributesAtIndex:index effectiveRange:aRange];&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;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)replaceCharactersInRange:(NSRange)range withString:(NSString *)str&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;    [m_attributedString replaceCharactersInRange:range withString:str];&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;int&lt;/span&gt; lengthChange = [str length] - range.length;&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;self&lt;/span&gt; edited:NSTextStorageEditedCharacters range:range changeInLength:lengthChange];&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;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)setAttributes:(NSDictionary *)attributes range:(NSRange)range&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;    [m_attributedString setAttributes:attributes range:range];&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;self&lt;/span&gt; edited:NSTextStorageEditedAttributes range:range changeInLength:&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-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;&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;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:48:03 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/subcalssing_text_storagenst.html</guid>
		</item>
		<item>
			<title>Objective-C入門</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/objective-c.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;日本語&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; color: rgb(0, 0, 255); font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="http://wisdom.sakura.ne.jp/programming/objc/index.html%22%20target=%22NewWindow"&gt;http://wisdom.sakura.ne.jp/programming/objc/index.html &lt;/a&gt;&lt;/span&gt;&lt;a href="http://wisdom.sakura.ne.jp/programming/objc/index.html"&gt; &lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:47:45 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/objective-c.html</guid>
		</item>
		<item>
			<title>NSWindow (無反応なウィンドウ window that is transparent to mouse -- ignore mouse action)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nswindow_window_that_is_tra.html</link>
			<description>
&lt;p&gt;&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aWindow setIgnoresMouseEvents:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:47:22 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nswindow_window_that_is_tra.html</guid>
		</item>
		<item>
			<title>NSWindow (Open Multiple Sub Windows using seperate nib file)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nswindow_open_multiple_sub_.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;Open Multiple Sub Windows&lt;/b&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;(1) create document based NIB file and connect properly as shown below.&lt;/b&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;(SubWindowController is a sub-class of NSObject. Initiate and make file of it.)&lt;/b&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;Connect owner to window&lt;/b&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;img src="http://homepage.mac.com/mnishikata/_Media/id138_textmedium.jpeg" alt="p1" /&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;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;Connect window to controller&lt;/b&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;img src="http://homepage.mac.com/mnishikata/_Media/id139_textmedium.jpeg" alt="p2" /&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;b&gt;(2) Coding&lt;/b&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;b&gt;To open,&lt;/b&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;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSWindowController* wc = &lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[[NSWindowController alloc] initWithWindowNibName:&lt;span style="color: rgb(137, 19, 21);"&gt;@"NIBFilenameHere(without.nib)"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSWindow* aWindow = [wc window];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[wc showWindow:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 14px/normal Helvetica; font-family: Helvetica; font-size: 12px;"&gt;&lt;b&gt;When window is opened, subWindowController instance is made.&lt;/b&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 14px/normal Helvetica; font-family: Helvetica; font-size: 12px;"&gt;&lt;b&gt;Methods can be implemented in "SubWindowController.m"&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;#import "SubWindowController.h"&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@implementation&lt;/span&gt; SubWindowController&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)windowDidBecomeKey:(NSNotification *)aNotification&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)windowDidExpose:(NSNotification *)aNotification&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;@end&lt;/tt&gt;&lt;/pre&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:46:59 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nswindow_open_multiple_sub_.html</guid>
		</item>
		<item>
			<title>NSTimer (set timer)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nstimer_set_timer.html</link>
			<description>
&lt;p /&gt;
&lt;p style="font: normal normal normal 12px/normal Lucida Grande; font-family: 'Lucida Grande';"&gt;NSTimer (set timer)&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;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;				&lt;/span&gt;NSTimer* aTimer = [NSTimer scheduledTimerWithTimeInterval:&lt;span style="color: rgb(0, 0, 255);"&gt;0.5&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;									&lt;/span&gt; target:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt; &lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   selector:&lt;span style="color: rgb(118, 15, 80);"&gt;@selector&lt;/span&gt;(myTimerMethod)&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;								&lt;/span&gt;   userInfo:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;									&lt;/span&gt;repeats:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;---&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;-(void)myTimerMethod&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;//code here&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;---&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;to stop timer,&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt; [aTimer invalidate];&lt;/tt&gt;&lt;/pre&gt;
 &lt;p /&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:46:24 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nstimer_set_timer.html</guid>
		</item>
		<item>
			<title>NSTableView basic</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nstableview_basic.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Lucida Grande; font-family: 'Lucida Grande';"&gt;NSTableView basic&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;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Helvetica; font-family: Helvetica;"&gt;&lt;img src="http://homepage.mac.com/mnishikata/_Media/id133_textmedium.jpeg" alt="pct" /&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;/* MyTableView1Controller */&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;#import &amp;lt;Cocoa/Cocoa.h&amp;gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@interface&lt;/span&gt; MyTableView1Controller : NSObject&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&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; myTableView1;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSMutableArray* dataArray;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)tableAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)addAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;@end&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;-----&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Pro; font-family: 'Hiragino Kaku Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;#import "MyTableView1Controller.h"&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@implementation&lt;/span&gt; MyTableView1Controller&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)addAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; [dataArray addObject:&lt;span style="color: rgb(137, 19, 21);"&gt;@"Untitled"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; [myTableView1 reloadData];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; [myTableView1 selectRow:([dataArray count] - &lt;span style="color: rgb(0, 0, 255);"&gt;1&lt;/span&gt;) byExtendingSelection:&lt;span style="color: rgb(118, 15, 80);"&gt;NO&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt; [myTableView1 editColumn:&lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt; row:([dataArray count] - &lt;span style="color: rgb(0, 0, 255);"&gt;1&lt;/span&gt;) withEvent:&lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; select:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)tableAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; row = [sender selectedRow];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    NSLog(&lt;/span&gt;@"the user just clicked on row %d"&lt;span style="color: rgb(0, 0, 0);"&gt;, row);&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)numberOfRowsInTableView:(NSTableView *)tableView&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; [dataArray count];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)tableView:(NSTableView *)tableView&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;      objectValueForTableColumn:(NSTableColumn *)tableColumn&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;row:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)row&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; [dataArray objectAtIndex:row];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)tableView:(NSTableView *)aTableView setObjectValue:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)anObject&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;   forTableColumn:(NSTableColumn *)aTableColumn row:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)rowIndex&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    [dataArray replaceObjectAtIndex:rowIndex withObject:anObject];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;@end&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;＝＝＝＝&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;コラムが二列の場合&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;#import "MyTableView1Controller.h"&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;@implementation&lt;/span&gt; MyTableView1Controller&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;/*&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSLog(@"start");&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;myTableView1Data_A = [NSArray arrayWithObjects:@"index",@"test1",@"value",@"text2", NULL];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1 reloadData];&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;*/&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)buttonAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender &lt;span style="color: rgb(35, 110, 37);"&gt;//&lt;/span&gt;&lt;span style="font: normal normal normal 12px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka;"&gt;初期化（スタート）アクション&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_A release];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;myTableView1Data_A = [[NSMutableArray alloc] init];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_A addObject:&lt;span style="color: rgb(137, 19, 21);"&gt;@"textA"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_B release];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;myTableView1Data_B = [[NSMutableArray alloc] init];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_B addObject:&lt;span style="color: rgb(137, 19, 21);"&gt;@"textB"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1 reloadData];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)addAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_A addObject:&lt;span style="color: rgb(137, 19, 21);"&gt;@"UntitledA"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_B addObject:&lt;span style="color: rgb(137, 19, 21);"&gt;@"UntitledB"&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1 reloadData];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1 selectRow:([myTableView1Data_A count] - &lt;span style="color: rgb(0, 0, 255);"&gt;1&lt;/span&gt;) byExtendingSelection:&lt;span style="color: rgb(118, 15, 80);"&gt;NO&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1 editColumn:&lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt; row:([myTableView1Data_A count] - &lt;span style="color: rgb(0, 0, 255);"&gt;1&lt;/span&gt;) withEvent:&lt;span style="color: rgb(118, 15, 80);"&gt;nil&lt;/span&gt; select:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)deleteAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; row = [myTableView1 selectedRow];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_A removeObjectAtIndex:row];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1Data_B removeObjectAtIndex:row];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[myTableView1 reloadData];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)tableAction:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt; row = [sender selectedRow];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    NSLog(&lt;/span&gt;@"the user just clicked on row %d"&lt;span style="color: rgb(0, 0, 0);"&gt;, row);&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;span style="font: normal normal normal 12px/normal Monaco; font-family: Monaco;"&gt;&lt;tt&gt;/////////&lt;/tt&gt;&lt;/span&gt;いかがテーブルの実態&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)numberOfRowsInTableView:(NSTableView *)tableView&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; [myTableView1Data_A count];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)tableView:(NSTableView *)tableView&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;      objectValueForTableColumn:(NSTableColumn *)aTableColumn&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;			&lt;/span&gt;row:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)row&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;([[aTableColumn identifier] isEqualToString:&lt;span style="color: rgb(137, 19, 21);"&gt;@"ColumnA"&lt;/span&gt;]) {&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;        &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt;  [myTableView1Data_A objectAtIndex:row];  &lt;span style="color: rgb(35, 110, 37);"&gt;// Column A&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    }&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;([[aTableColumn identifier] isEqualToString:&lt;span style="color: rgb(137, 19, 21);"&gt;@"ColumnB"&lt;/span&gt;]) {&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;        &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; [myTableView1Data_B objectAtIndex:row];  &lt;span style="color: rgb(35, 110, 37);"&gt;// Column B&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    }&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)tableView:(NSTableView *)aTableView setObjectValue:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)anObject&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;   forTableColumn:(NSTableColumn *)aTableColumn row:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)rowIndex&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;([[aTableColumn identifier] isEqualToString:&lt;span style="color: rgb(137, 19, 21);"&gt;@"ColumnA"&lt;/span&gt;]) {&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1Data_A replaceObjectAtIndex:rowIndex withObject:anObject];  &lt;span style="color: rgb(35, 110, 37);"&gt;// Column A&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    }&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;([[aTableColumn identifier] isEqualToString:&lt;span style="color: rgb(137, 19, 21);"&gt;@"ColumnB"&lt;/span&gt;]) {&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1Data_B replaceObjectAtIndex:rowIndex withObject:anObject];  &lt;span style="color: rgb(35, 110, 37);"&gt;// Column B&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    }&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;@end&lt;/tt&gt;&lt;/pre&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:46:05 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nstableview_basic.html</guid>
		</item>
		<item>
			<title>NSTableView (Drag&amp;drop)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nstableview_dragdrop.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; color: rgb(0, 0, 255); font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="http://www.nongnu.org/gstutorial/en/ch13s04.html%22%20target=%22NewWindow"&gt;http://www.nongnu.org/gstutorial/en/ch13s04.html&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:45:47 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nstableview_dragdrop.html</guid>
		</item>
		<item>
			<title>NSString (Search in NSString)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsstring_search_in_nsstring.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSRange aRange = [aString rangeOfString:aKey];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;//result is stored in aRange&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:45:27 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsstring_search_in_nsstring.html</guid>
		</item>
		<item>
			<title>NSScrollView (Enable resizeing NSView in NSScrollView)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsscrollview_enable_resizei.html</link>
			<description>
&lt;p&gt;&lt;pre&gt;&lt;tt&gt;//config textView&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aView setHorizontallyResizable:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aView setVerticallyResizable:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;]; &lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aView setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[scrollView setDocumentView:aView];&lt;/tt&gt;&lt;/pre&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:45:11 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsscrollview_enable_resizei.html</guid>
		</item>
		<item>
			<title>NSRect</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsrect.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;NSRectを最初に宣言するときに&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;NSRect rect = NSZeroRect;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;のように何かを入れておく。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;何故かはわからないけど、そうしないと、その後の動作がおかしくなる場合がある。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;×NG&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;NSRect rect;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;...&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;.&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;rect = anotherRect;&lt;/p&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:44:38 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsrect.html</guid>
		</item>
		<item>
			<title>NSLock</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nslock.html</link>
			<description>
&lt;p /&gt;
&lt;pre&gt;&lt;tt&gt;NSLock* lock;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;span style="font: normal normal normal 12px/normal Monaco; font-family: Monaco;"&gt;&lt;tt&gt;[lock lock]; &lt;/tt&gt;&lt;/span&gt;から、ロックを取得　※取得できるまで待つ&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;〜この中にロックで保護されるコードを書く。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;[lock unlock];　で解除。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;別のスレッドでも同様。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;なお、&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;@synchronized(オブジェクト)&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;{&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;// ここに書かれたコードは、当該オブジェクトについて一度に一つのスレッドでしか実行されない。&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;//オブジェクト＝self など&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; font-family: Osaka;"&gt;}&lt;/p&gt;
 &lt;p /&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:43:04 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nslock.html</guid>
		</item>
		<item>
			<title>NSFileWrapper</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsfilewrapper.html</link>
			<description>
&lt;p /&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Std; font-family: 'Hiragino Kaku Gothic Std';"&gt;How to create directory file wrapper&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;//ファイルラッパの作成&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSFileWrapper *wrapper = [[[NSFileWrapper alloc] initDirectoryWithFileWrappers:NULL ] autorelease];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;//データを追加する&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[wrapper   addFileWrapper:aWrapper ];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[wrapper   addFileWrapper:anotherWrapper ];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[wrapper addRegularFileWithContents:aData preferredFilename:@"aData"];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Kaku Gothic Std; font-family: 'Hiragino Kaku Gothic Std';"&gt;How to decode file wrapper&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSDictionary* aDic  = [wrapper fileWrappers];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSFileWrapper* aWrapper;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSFileWrapper* anotherWrapper;&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;aWrapper = [aDic objectForKey:@"aWrapper's name.rtfd"];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;anotherWrapper  = [aDic objectForKey:@"anotherWrapper's name.rtfd"];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;data1 = [aWrapper serializedRepresentation];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;data2  = [anotherWrapper serializedRepresentation];&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Hiragino Maru Gothic Pro; font-family: 'Hiragino Maru Gothic Pro';"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;data3 = [[aDic objectForKey:@"aData"] regularFileContents];&lt;/p&gt;
 &lt;p /&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:42:44 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsfilewrapper.html</guid>
		</item>
		<item>
			<title>NSDocument, NSSavePanel</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nsdocument_nssavepanel.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE - normal&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;- (NSData*)dataRepresentationOfType:(NSString*)type&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData* mySavingData;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSRange mySavingRange;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingRange.location = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingRange.length =  [[htmlSource textStorage] length];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingData = [htmlSource RTFFromRange:mySavingRange];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;// Create data from stirng with encoding&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; mySavingData;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 10px/normal Osaka; font-family: Osaka; font-size: 9px;"&gt;この関数は保存の際に勝手に呼び出される。&lt;/p&gt;
&lt;p style="font: normal normal normal 10px/normal Osaka; font-family: Osaka; font-size: 9px;"&gt;NSTextView ---&amp;gt; NSStorage に変換し、NSStorageのlengthメソッドでlengthを取り出している。&lt;/p&gt;
&lt;p style="font: normal normal normal 10px/normal Osaka; font-family: Osaka; font-size: 9px;"&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE - using file wrapper&lt;/p&gt;
&lt;p style="font: normal normal normal 10px/normal Osaka; font-family: Osaka; font-size: 9px;"&gt;ファイルラッパを使った保存&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (NSFileWrapper *)fileWrapperRepresentationOfType:(NSString*)type&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData* mySavingData;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSRange mySavingRange;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingRange.location = &lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingRange.length =  [[htmlSource textStorage] length];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;mySavingData = [htmlSource RTFDFromRange:mySavingRange];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSFileWrapper *wrapper = [[htmlSource textStorage] RTFDFileWrapperFromRange:mySavingRange documentAttributes:(NSDictionary *)&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;// Create data from stirng with encoding&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;    &lt;span style="color: rgb(118, 15, 80);"&gt;return&lt;/span&gt; wrapper;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:42:21 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nsdocument_nssavepanel.html</guid>
		</item>
		<item>
			<title>Convert NSData to NSString or vise versa</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/convert_nsdata_to_nsstring_.html</link>
			<description>
&lt;p&gt;&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSString* aStr;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;aStr = [[NSString alloc] initWithData:aData encoding:NSASCIIStringEncoding];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSData* aData;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;aData = [aStr dataUsingEncoding: NSASCIIStringEncoding];&lt;/tt&gt;&lt;/pre&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:41:57 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/convert_nsdata_to_nsstring_.html</guid>
		</item>
		<item>
			<title>NSSavePanel (opening save dialogue)</title>
			<link>http://homepage.mac.com/mnishikata/objective-c_memo/nssavepanel_opening_save_di.html</link>
			<description>
&lt;p&gt;&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE (modal dialogue)&lt;/p&gt;
&lt;p style="font: normal normal normal 12px/normal Osaka; color: rgb(35, 110, 37); font-family: Osaka;"&gt;&lt;span style="font: normal normal normal 12px/normal Monaco; font-family: Monaco;"&gt;&lt;tt&gt;/*&lt;/tt&gt;&lt;/span&gt;これでモーダルダイアログ保存ができる。&lt;span style="font: normal normal normal 12px/normal Monaco; font-family: Monaco;"&gt;&lt;tt&gt;array A + array B &lt;/tt&gt;&lt;/span&gt;の形式&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;- (IBAction)saveTable:(id)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSSavePanel* aPanel = [NSSavePanel savePanel];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;if( [aPanel runModal] == NSFileHandlingPanelOKButton ){&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSArray *myArray;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;myArray = [NSArray arrayWithObjects:myTableView1Data_A, myTableView1Data_B, NULL];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myArray writeToFile:[aPanel filename] atomically:YES];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;*/&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;p style="font: normal normal normal 18px/normal Marker Felt; color: rgb(255, 0, 0); font-family: 'Marker Felt'; font-size: 15px;"&gt;EXAMPLE (sheet)&lt;/p&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)saveTable:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;* contextInfo;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSSavePanel* aPanel = [NSSavePanel savePanel];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aPanel beginSheetForDirectory:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;  file:&lt;/span&gt;@"Replace Data"&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;modalForWindow:[myTextView window]&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt; modalDelegate:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;didEndSelector:&lt;span style="color: rgb(118, 15, 80);"&gt;@selector&lt;/span&gt;(savePanelDidEnd:returnCode:contextInfo:)&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;   contextInfo:contextInfo];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;///&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)returnCode contextInfo:(&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt; *)contextInfo&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( returnCode == NSFileHandlingPanelOKButton ){&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSArray *myArray;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;myArray = [NSArray arrayWithObjects:myTableView1Data_A, myTableView1Data_B, &lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myArray writeToFile:[sheet filename] atomically:&lt;span style="color: rgb(118, 15, 80);"&gt;YES&lt;/span&gt;];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;///&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;///open&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;IBAction&lt;/span&gt;)loadTable:(&lt;span style="color: rgb(118, 15, 80);"&gt;id&lt;/span&gt;)sender&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt; quitTableEditing];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;* contextInfo;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;NSOpenPanel* aPanel = [NSOpenPanel openPanel];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;[aPanel beginSheetForDirectory:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt;  file:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;							&lt;/span&gt; types:&lt;span style="color: rgb(118, 15, 80);"&gt;NULL&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;modalForWindow:[myTextView window]&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt; modalDelegate:&lt;span style="color: rgb(118, 15, 80);"&gt;self&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;didEndSelector:&lt;span style="color: rgb(118, 15, 80);"&gt;@selector&lt;/span&gt;(openPanelDidEnd:returnCode:contextInfo:)&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;					&lt;/span&gt;   contextInfo:contextInfo];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/span&gt;///&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;- (&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt;)openPanelDidEnd:(NSSavePanel *)sheet returnCode:(&lt;span style="color: rgb(118, 15, 80);"&gt;int&lt;/span&gt;)returnCode contextInfo:(&lt;span style="color: rgb(118, 15, 80);"&gt;void&lt;/span&gt; *)contextInfo&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;span style="color: rgb(118, 15, 80);"&gt;if&lt;/span&gt;( returnCode == NSFileHandlingPanelOKButton ){&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;NSMutableArray *myArray = [ [NSMutableArray alloc] initWithContentsOfFile:[sheet filename]];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1Data_A release];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1Data_B release];&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;myTableView1Data_A = [[NSMutableArray alloc] initWithArray:[myArray objectAtIndex:&lt;span style="color: rgb(0, 0, 255);"&gt;0&lt;/span&gt;] ];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;myTableView1Data_B = [[NSMutableArray alloc] initWithArray:[myArray objectAtIndex:&lt;span style="color: rgb(0, 0, 255);"&gt;1&lt;/span&gt;] ];&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myTableView1 reloadData];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;[myArray release];&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;/pre&gt;
&lt;br /&gt;
 &lt;/p&gt;
			</description>
			<pubDate>Tue, 14 Aug 2007 20:40:56 +1200</pubDate>
			<guid>http://homepage.mac.com/mnishikata/objective-c_memo/nssavepanel_opening_save_di.html</guid>
		</item>
 	</channel>
</rss>
