<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/objective-c/tags/osx</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 11:00:26 GMT</pubDate>
<item>
<title>(Objective C) Bring Application to Front - mirage3d</title>
<link>http://snipplr.com/view/61843/bring-application-to-front/</link>
<description><![CDATA[ <p>Bring an application to front to gain focus.</p> ]]></description>
<pubDate>Tue, 13 Dec 2011 18:36:24 GMT</pubDate>
<guid>http://snipplr.com/view/61843/bring-application-to-front/</guid>
</item>
<item>
<title>(Objective C) Quickest Way to Shell - Use system() instead of NSTask - zingo</title>
<link>http://snipplr.com/view/56345/quickest-way-to-shell--use-system-instead-of-nstask/</link>
<description><![CDATA[ <p>Cocoa provides NSTask to run subprocesses. It can be used to run shell scripts, but all this manual pipe and file handling is a bit cumbersome. Fortunately, for a simple script, we can use the trusty old system and redirect its result to a file.</p> ]]></description>
<pubDate>Sat, 09 Jul 2011 04:53:37 GMT</pubDate>
<guid>http://snipplr.com/view/56345/quickest-way-to-shell--use-system-instead-of-nstask/</guid>
</item>
<item>
<title>(Objective C) Checking If You App Has Been Run Before - zingo</title>
<link>http://snipplr.com/view/54411/checking-if-you-app-has-been-run-before/</link>
<description><![CDATA[ <p>Do you need you app to do something when it is first run on a certain computer? Do you need to know if it has been run before? Enter the following code into your Application Delegate.

This code creates a BOOL that is created when the app is run. The if-else statement reads the value of the BOOL -- Yes or No. NOTE: You'll notice that if you run the app from xcode with the run button it says "Not run before". When you run it again it still says that. In order to truly test locate you apps Debug .app application then run that. Xcode clears out the data when you run it again. IT DOES WORK though, so don't worry if running you app in Xcode still gives you the Not Run Before result.</p> ]]></description>
<pubDate>Thu, 26 May 2011 14:19:04 GMT</pubDate>
<guid>http://snipplr.com/view/54411/checking-if-you-app-has-been-run-before/</guid>
</item>
<item>
<title>(Objective C) Drawing Scaled Rectangles with NSDrawNinePartImage - zingo</title>
<link>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</link>
<description><![CDATA[ <p>Drawing scaled rectangles of arbitrary width and height that keeps the corner and sides properly scaled while growing the center.</p> ]]></description>
<pubDate>Fri, 20 Aug 2010 08:22:46 GMT</pubDate>
<guid>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</guid>
</item>
<item>
<title>(Objective C) Recursively list all files and directories below a given directory - fuzzylollipop</title>
<link>http://snipplr.com/view/23016/recursively-list-all-files-and-directories-below-a-given-directory/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 12 Nov 2009 12:04:22 GMT</pubDate>
<guid>http://snipplr.com/view/23016/recursively-list-all-files-and-directories-below-a-given-directory/</guid>
</item>
<item>
<title>(Objective C) Mac OS X Network Interfaces - Zydeco</title>
<link>http://snipplr.com/view/20993/mac-os-x-network-interfaces/</link>
<description><![CDATA[ <p>Returns an array with the names of the network interfaces (en0, en1, fw0, etc)  
Link to the IOKit framework</p> ]]></description>
<pubDate>Sun, 11 Oct 2009 10:48:17 GMT</pubDate>
<guid>http://snipplr.com/view/20993/mac-os-x-network-interfaces/</guid>
</item>
<item>
<title>(Objective C) Parse Header File for Outlets and makes sure that they are set at Runtime - zingo</title>
<link>http://snipplr.com/view/8642/parse-header-file-for-outlets-and-makes-sure-that-they-are-set-at-runtime/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 26 Sep 2008 20:33:33 GMT</pubDate>
<guid>http://snipplr.com/view/8642/parse-header-file-for-outlets-and-makes-sure-that-they-are-set-at-runtime/</guid>
</item>
<item>
<title>(Objective C) Removing preferences belonging to your app - zingo</title>
<link>http://snipplr.com/view/7453/removing-preferences-belonging-to-your-app/</link>
<description><![CDATA[ <p>Remove all the keys of the application’s preferences file from ~/Library/Preferences with Cocoa’s NSUserDefaults class.</p> ]]></description>
<pubDate>Tue, 22 Jul 2008 23:40:51 GMT</pubDate>
<guid>http://snipplr.com/view/7453/removing-preferences-belonging-to-your-app/</guid>
</item>
<item>
<title>(Objective C) Kill App after Expire Date (Suicidal Code Redux) - zingo</title>
<link>http://snipplr.com/view/7196/kill-app-after-expire-date-suicidal-code-redux/</link>
<description><![CDATA[ <p>Using a gcc predefined macro, __DATE__, the code can know for itself when it was compiled, and build in an expiration date based on that value.

The former code (http://snipplr.com/view/3448/kill-app-after-expire-date/) was not internationalised and might cause an issue when run outside of English speaking countries. This code resolves the locale issue.</p> ]]></description>
<pubDate>Wed, 09 Jul 2008 22:39:05 GMT</pubDate>
<guid>http://snipplr.com/view/7196/kill-app-after-expire-date-suicidal-code-redux/</guid>
</item>
<item>
<title>(Objective C) Filesystem - Testing FS Type - zingo</title>
<link>http://snipplr.com/view/6193/filesystem--testing-fs-type/</link>
<description><![CDATA[ <p>This can be used to test FS type.</p> ]]></description>
<pubDate>Mon, 12 May 2008 21:54:23 GMT</pubDate>
<guid>http://snipplr.com/view/6193/filesystem--testing-fs-type/</guid>
</item>
<item>
<title>(Objective C) Testing Regular Expressions for NSString - zingo</title>
<link>http://snipplr.com/view/5165/testing-regular-expressions-for-nsstring/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 23 Feb 2008 22:16:42 GMT</pubDate>
<guid>http://snipplr.com/view/5165/testing-regular-expressions-for-nsstring/</guid>
</item>
<item>
<title>(Objective C) Saving Data to File - zingo</title>
<link>http://snipplr.com/view/5138/saving-data-to-file/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 21 Feb 2008 01:50:59 GMT</pubDate>
<guid>http://snipplr.com/view/5138/saving-data-to-file/</guid>
</item>
<item>
<title>(Objective C) Macro for ASL Log like NSLog - zingo</title>
<link>http://snipplr.com/view/4684/macro-for-asl-log-like-nslog/</link>
<description><![CDATA[ <p>Macro to give an asl_log-like NSLog.</p> ]]></description>
<pubDate>Sun, 20 Jan 2008 20:19:32 GMT</pubDate>
<guid>http://snipplr.com/view/4684/macro-for-asl-log-like-nslog/</guid>
</item>
<item>
<title>(Objective C) Macro for VERBOSE_DEBUG_OUTPUT - zingo</title>
<link>http://snipplr.com/view/4235/macro-for-verbosedebugoutput/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 01 Dec 2007 19:28:07 GMT</pubDate>
<guid>http://snipplr.com/view/4235/macro-for-verbosedebugoutput/</guid>
</item>
<item>
<title>(Objective C) Importing data with coredata - zingo</title>
<link>http://snipplr.com/view/3884/importing-data-with-coredata/</link>
<description><![CDATA[ <p>A database table is basically an array of dictionary objects. As long 
as all the fields are valid property list types, you can loop through 
the array creating a managed object for each dictionary and setting 
the values. If you have an array controller in your nib and it's 
configured for your managed object, you can use this (where plist is 
expected to be an NSArray* - not sure why I made it an id).</p> ]]></description>
<pubDate>Thu, 11 Oct 2007 21:57:17 GMT</pubDate>
<guid>http://snipplr.com/view/3884/importing-data-with-coredata/</guid>
</item>
<item>
<title>(Objective C) NSLog with NSError and NSArray with managedObjectContext - zingo</title>
<link>http://snipplr.com/view/3497/nslog-with-nserror-and-nsarray-with-managedobjectcontext/</link>
<description><![CDATA[ <p>Prints content from an NSError or NSArray content from a managedObjectContext.</p> ]]></description>
<pubDate>Thu, 09 Aug 2007 19:28:39 GMT</pubDate>
<guid>http://snipplr.com/view/3497/nslog-with-nserror-and-nsarray-with-managedobjectcontext/</guid>
</item>
<item>
<title>(Objective C) kill app after expire date - zingo</title>
<link>http://snipplr.com/view/3448/kill-app-after-expire-date/</link>
<description><![CDATA[ <p>Using a gcc predefined macro, __DATE__, the code can know for itself when it was compiled, and build in an expiration date based on that value.

For a internationalised version see: http://snipplr.com/view/7196/kill-app-after-expire-date-suicidal-code-redux/</p> ]]></description>
<pubDate>Fri, 03 Aug 2007 22:48:27 GMT</pubDate>
<guid>http://snipplr.com/view/3448/kill-app-after-expire-date/</guid>
</item>
<item>
<title>(Objective C) How to prevent an application to become active when clicking in a window ? - tgunr</title>
<link>http://snipplr.com/view/2344/how-to-prevent-an-application-to-become-active-when-clicking-in-a-window-/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 16 Mar 2007 10:29:56 GMT</pubDate>
<guid>http://snipplr.com/view/2344/how-to-prevent-an-application-to-become-active-when-clicking-in-a-window-/</guid>
</item>
<item>
<title>(Objective C) NSMetadataQuery - tgunr</title>
<link>http://snipplr.com/view/2333/nsmetadataquery/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 14 Mar 2007 13:35:33 GMT</pubDate>
<guid>http://snipplr.com/view/2333/nsmetadataquery/</guid>
</item>
</channel>
</rss>