<?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/cocoa</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 29 Aug 2008 23:16:55 GMT</pubDate>
<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) Interface builder &amp;amp; iphone sdk - buscarini</title>
<link>http://snipplr.com/view/5599/interface-builder--iphone-sdk/</link>
<description><![CDATA[ <p>Para usar el interface builder con el iphone hay que crear una vista o una ventana, guardarla dentro del proyecto, y meter esta línea en appdelegate en applicationDidFinishLaunching.</p> ]]></description>
<pubDate>Fri, 28 Mar 2008 14:09:37 GMT</pubDate>
<guid>http://snipplr.com/view/5599/interface-builder--iphone-sdk/</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) Running a pre-canned AppleScript - sudarkoff</title>
<link>http://snipplr.com/view/5092/running-a-precanned-applescript/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 16 Feb 2008 19:14:33 GMT</pubDate>
<guid>http://snipplr.com/view/5092/running-a-precanned-applescript/</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) Reload a preference pane - 0xced</title>
<link>http://snipplr.com/view/3924/reload-a-preference-pane/</link>
<description><![CDATA[ <p>The preference pane that need to be reloaded must fork 'reload' with two arguments, then terminate System Preferences. In Cocoa, the fork is easily achieved with a NSTask. The first argument must be the bundle identifier of the preference pane to reload. The second argument must be the process identifier of the terminating application, i.e. System Preferences. In Cocoa, you can get it with [[NSProcessInfo processInfo] processIdentifier], which is equivalent to getpid().</p> ]]></description>
<pubDate>Thu, 18 Oct 2007 15:16:16 GMT</pubDate>
<guid>http://snipplr.com/view/3924/reload-a-preference-pane/</guid>
</item>
<item>
<title>(Objective C) Relaunch an application - 0xced</title>
<link>http://snipplr.com/view/3923/relaunch-an-application/</link>
<description><![CDATA[ <p>The application that needs to be restarted must fork 'relaunch' with two arguments, then terminate. In Cocoa, the fork is easily achieved with a NSTask. The first argument must be the path to the application to relaunch. The second argument must be the process identifier of the terminating application. In Cocoa, you can get it with [[NSProcessInfo processInfo] processIdentifier], which is equivalent to getpid().</p> ]]></description>
<pubDate>Thu, 18 Oct 2007 15:11:39 GMT</pubDate>
<guid>http://snipplr.com/view/3923/relaunch-an-application/</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) Run an NSAlert Sheet in your Cocoa App - tylerhall</title>
<link>http://snipplr.com/view/3517/run-an-nsalert-sheet-in-your-cocoa-app/</link>
<description><![CDATA[ <p>This code runs an alert sheet in your Cocoa app. You first create an NSAlert object, its properties, and define the method that should be called when the user dismisses the sheet. Then write the corresponding handler that tests for an "OK" or "Cancel" button press.</p> ]]></description>
<pubDate>Tue, 14 Aug 2007 15:21:41 GMT</pubDate>
<guid>http://snipplr.com/view/3517/run-an-nsalert-sheet-in-your-cocoa-app/</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) Useful Cocoa Macros - iloveitaly</title>
<link>http://snipplr.com/view/2453/useful-cocoa-macros/</link>
<description><![CDATA[ <p>Some macros that I use in many applications, provides an easy way to observe/retrieve preferences and access common application information</p> ]]></description>
<pubDate>Wed, 11 Apr 2007 11:44:22 GMT</pubDate>
<guid>http://snipplr.com/view/2453/useful-cocoa-macros/</guid>
</item>
<item>
<title>(Objective C) Resize NSSplitView Nicely - iloveitaly</title>
<link>http://snipplr.com/view/2452/resize-nssplitview-nicely/</link>
<description><![CDATA[ <p>This provides a nice split view resizing method with a minimum size restraint. You HAVE to specify MIN_LEFT_PANE_W for this to work.</p> ]]></description>
<pubDate>Wed, 11 Apr 2007 11:42:02 GMT</pubDate>
<guid>http://snipplr.com/view/2452/resize-nssplitview-nicely/</guid>
</item>
<item>
<title>(Objective C) DMCommonMacros - tgunr</title>
<link>http://snipplr.com/view/2372/dmcommonmacros/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 21 Mar 2007 16:36:26 GMT</pubDate>
<guid>http://snipplr.com/view/2372/dmcommonmacros/</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) Given a mount path, retrieve a USB device name - nunofgs</title>
<link>http://snipplr.com/view/1645/given-a-mount-path-retrieve-a-usb-device-name/</link>
<description><![CDATA[ <p>This is a bit of a hack, but it works. If someone knows of a better way, please let me know!</p> ]]></description>
<pubDate>Fri, 10 Nov 2006 19:43:34 GMT</pubDate>
<guid>http://snipplr.com/view/1645/given-a-mount-path-retrieve-a-usb-device-name/</guid>
</item>
<item>
<title>(Objective C) Open a movie in QuickTime via Cocoa - sudarkoff</title>
<link>http://snipplr.com/view/1509/open-a-movie-in-quicktime-via-cocoa/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 31 Oct 2006 17:51:14 GMT</pubDate>
<guid>http://snipplr.com/view/1509/open-a-movie-in-quicktime-via-cocoa/</guid>
</item>
<item>
<title>(Objective C) Limpiar el icono de la aplicación en el dock - xaviaracil</title>
<link>http://snipplr.com/view/74/limpiar-el-icono-de-la-aplicacin-en-el-dock/</link>
<description><![CDATA[ <p>Limpia el icono de la aplicación en el dock, de manera que vuelva a mostrar el icono original</p> ]]></description>
<pubDate>Thu, 29 Jun 2006 04:17:02 GMT</pubDate>
<guid>http://snipplr.com/view/74/limpiar-el-icono-de-la-aplicacin-en-el-dock/</guid>
</item>
</channel>
</rss>