<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Cocoa Maker</title><description>Cocoa Maker is a Podcast to teach you how to make applications using Cocoa that starts from the beginning to the end. We will teach you things from Memory Management to the Syntax of Cocoa it self.</description><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><pubDate>Thu, 24 Oct 2024 05:35:39 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">8</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://cocoa.mrgeckosmedia.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>Mr. Gecko's Media</copyright><itunes:image href="http://mrgeckosmedia.com/CocoaMaker.png"/><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords><itunes:summary>Cocoa Maker is a Podcast to teach you how to make applications using Cocoa that starts from the beginning to the end. We will teach you things from Memory Management to the Syntax of Cocoa it self.</itunes:summary><itunes:subtitle>Learn Objective-C</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Software How-To"/></itunes:category><itunes:author>Mr. Gecko</itunes:author><itunes:owner><itunes:email>cocoa@mrgeckosmedia.com</itunes:email><itunes:name>Mr. Gecko</itunes:name></itunes:owner><item><title>Cocoa Maker 7 - Libraries and Frameworks</title><link>http://cocoa.mrgeckosmedia.com/2010/04/cocoa-maker-7-libraries-and-frameworks.html</link><category>Array</category><category>Cocoa</category><category>Frameworks</category><category>iPhone</category><category>Libraries</category><category>Mac</category><category>Objective-C</category><category>OSX</category><category>Programming</category><pubDate>Tue, 13 Apr 2010 16:42:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-338950669298727751</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), and Nick, explains libraries and frameworks.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker7-LibrariesAndFrameworks/CocoaMaker7.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker7-LibrariesAndFrameworks/CocoaMaker7Preview.png" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
11:56&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Example code from episode.&lt;br /&gt;
Libraries&lt;br /&gt;
Libraries included, /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;
#import &amp;lt;openssl/evp.h&amp;gt;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
 
 NSString *string = @&amp;quot;Hello&amp;quot;;
 
 OpenSSL_add_all_algorithms();
 unsigned char outbuf[EVP_MAX_MD_SIZE];
 unsigned int templen, inlen = [string length];
 const char *input = [string UTF8String];
 EVP_MD_CTX ctx;
 
 const EVP_MD *digest = EVP_md5();
 if(!digest) {
  NSLog(@&amp;quot;cannot get digest with name MD5&amp;quot;);
  return 1;
 }
 
 EVP_MD_CTX_init(&amp;amp;ctx);
 EVP_DigestInit(&amp;amp;ctx,digest);
 if(!EVP_DigestUpdate(&amp;amp;ctx,input,inlen)) {
  NSLog(@&amp;quot;EVP_DigestUpdate() failed!&amp;quot;);
  EVP_MD_CTX_cleanup(&amp;amp;ctx);
  return 1;   
 }
 if (!EVP_DigestFinal(&amp;amp;ctx, outbuf, &amp;amp;templen)) {
  NSLog(@&amp;quot;EVP_DigesttFinal() failed!&amp;quot;);
  EVP_MD_CTX_cleanup(&amp;amp;ctx);
  return 1;
 }
 EVP_MD_CTX_cleanup(&amp;amp;ctx);
 
 NSMutableString *md5 = [NSMutableString string];
 for (int i=0; i&amp;lt;templen; i++) {
  [md5 appendFormat:@&amp;quot;%x&amp;quot;, outbuf[i]];
 }
 NSLog(@&amp;quot;MD5 of %@ is %@&amp;quot;, string, md5);
 
    [pool drain];
    return 0;
}
&lt;/pre&gt;Frameworks&lt;br /&gt;
Frameworks included, AddressBook.framework&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;
#import &amp;lt;AddressBook/AddressBook.h&amp;gt;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
 
 ABAddressBook *addressBook = [ABAddressBook sharedAddressBook];
 NSArray *people = [addressBook people];
 for (int i=0; i&amp;lt;[people count]; i++) {
  ABPerson *person = [people objectAtIndex:i];
  NSString *firstName = [person valueForProperty:kABFirstNameProperty];
  NSString *lastName = [person valueForProperty:kABLastNameProperty];
  NSString *name = nil;
  if (firstName!=nil) {
   name = firstName;
   if (lastName!=nil)
    name = [name stringByAppendingFormat:@&amp;quot; %@&amp;quot;, lastName];
  }
  if (name!=nil)
   NSLog(@&amp;quot;Person named: %@&amp;quot;, name);
 }
 
    [pool drain];
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker7-LibrariesAndFrameworks/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker7-LibrariesAndFrameworks/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker7-LibrariesAndFrameworks/CocoaMaker7.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Nick, explains libraries and frameworks. 11:56 Example code from episode. Libraries Libraries included, /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib #import &amp;lt;Foundation/Foundation.h&amp;gt; #import &amp;lt;openssl/evp.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *string = @&amp;quot;Hello&amp;quot;; OpenSSL_add_all_algorithms(); unsigned char outbuf[EVP_MAX_MD_SIZE]; unsigned int templen, inlen = [string length]; const char *input = [string UTF8String]; EVP_MD_CTX ctx; const EVP_MD *digest = EVP_md5(); if(!digest) { NSLog(@&amp;quot;cannot get digest with name MD5&amp;quot;); return 1; } EVP_MD_CTX_init(&amp;amp;ctx); EVP_DigestInit(&amp;amp;ctx,digest); if(!EVP_DigestUpdate(&amp;amp;ctx,input,inlen)) { NSLog(@&amp;quot;EVP_DigestUpdate() failed!&amp;quot;); EVP_MD_CTX_cleanup(&amp;amp;ctx); return 1; } if (!EVP_DigestFinal(&amp;amp;ctx, outbuf, &amp;amp;templen)) { NSLog(@&amp;quot;EVP_DigesttFinal() failed!&amp;quot;); EVP_MD_CTX_cleanup(&amp;amp;ctx); return 1; } EVP_MD_CTX_cleanup(&amp;amp;ctx); NSMutableString *md5 = [NSMutableString string]; for (int i=0; i&amp;lt;templen; i++) { [md5 appendFormat:@&amp;quot;%x&amp;quot;, outbuf[i]]; } NSLog(@&amp;quot;MD5 of %@ is %@&amp;quot;, string, md5); [pool drain]; return 0; } Frameworks Frameworks included, AddressBook.framework #import &amp;lt;Foundation/Foundation.h&amp;gt; #import &amp;lt;AddressBook/AddressBook.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; ABAddressBook *addressBook = [ABAddressBook sharedAddressBook]; NSArray *people = [addressBook people]; for (int i=0; i&amp;lt;[people count]; i++) { ABPerson *person = [people objectAtIndex:i]; NSString *firstName = [person valueForProperty:kABFirstNameProperty]; NSString *lastName = [person valueForProperty:kABLastNameProperty]; NSString *name = nil; if (firstName!=nil) { name = firstName; if (lastName!=nil) name = [name stringByAppendingFormat:@&amp;quot; %@&amp;quot;, lastName]; } if (name!=nil) NSLog(@&amp;quot;Person named: %@&amp;quot;, name); } [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Nick, explains libraries and frameworks. 11:56 Example code from episode. Libraries Libraries included, /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib #import &amp;lt;Foundation/Foundation.h&amp;gt; #import &amp;lt;openssl/evp.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *string = @&amp;quot;Hello&amp;quot;; OpenSSL_add_all_algorithms(); unsigned char outbuf[EVP_MAX_MD_SIZE]; unsigned int templen, inlen = [string length]; const char *input = [string UTF8String]; EVP_MD_CTX ctx; const EVP_MD *digest = EVP_md5(); if(!digest) { NSLog(@&amp;quot;cannot get digest with name MD5&amp;quot;); return 1; } EVP_MD_CTX_init(&amp;amp;ctx); EVP_DigestInit(&amp;amp;ctx,digest); if(!EVP_DigestUpdate(&amp;amp;ctx,input,inlen)) { NSLog(@&amp;quot;EVP_DigestUpdate() failed!&amp;quot;); EVP_MD_CTX_cleanup(&amp;amp;ctx); return 1; } if (!EVP_DigestFinal(&amp;amp;ctx, outbuf, &amp;amp;templen)) { NSLog(@&amp;quot;EVP_DigesttFinal() failed!&amp;quot;); EVP_MD_CTX_cleanup(&amp;amp;ctx); return 1; } EVP_MD_CTX_cleanup(&amp;amp;ctx); NSMutableString *md5 = [NSMutableString string]; for (int i=0; i&amp;lt;templen; i++) { [md5 appendFormat:@&amp;quot;%x&amp;quot;, outbuf[i]]; } NSLog(@&amp;quot;MD5 of %@ is %@&amp;quot;, string, md5); [pool drain]; return 0; } Frameworks Frameworks included, AddressBook.framework #import &amp;lt;Foundation/Foundation.h&amp;gt; #import &amp;lt;AddressBook/AddressBook.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; ABAddressBook *addressBook = [ABAddressBook sharedAddressBook]; NSArray *people = [addressBook people]; for (int i=0; i&amp;lt;[people count]; i++) { ABPerson *person = [people objectAtIndex:i]; NSString *firstName = [person valueForProperty:kABFirstNameProperty]; NSString *lastName = [person valueForProperty:kABLastNameProperty]; NSString *name = nil; if (firstName!=nil) { name = firstName; if (lastName!=nil) name = [name stringByAppendingFormat:@&amp;quot; %@&amp;quot;, lastName]; } if (name!=nil) NSLog(@&amp;quot;Person named: %@&amp;quot;, name); } [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker 6 - Arrays, Dictionaries, and Property Lists</title><link>http://cocoa.mrgeckosmedia.com/2010/03/cocoa-maker-6-arrays-dictionaries-and.html</link><category>Array</category><category>Cocoa</category><category>Dictionary</category><category>iPhone</category><category>Mac</category><category>NSArray</category><category>NSDictionary</category><category>NSPropertyListSerialization</category><category>Objective-C</category><category>OSX</category><category>Plist</category><category>Programming</category><pubDate>Mon, 22 Mar 2010 19:46:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-8752012220147603547</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), and John (@&lt;a href="http://twitter.com/zimipoder"&gt;ZimiPoder&lt;/a&gt;), shows how Dictionaries, Arrays and Property Lists works in Cocoa.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker6-ArraysDictionariesAndPropertyLists/CocoaMaker6.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker6-ArraysDictionariesAndPropertyLists/CocoaMaker6Preview.png" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
12:40&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Example code from episode.&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSLog(@&amp;quot;Array&amp;quot;);
    NSArray *array = [NSArray arrayWithObjects:@&amp;quot;Orange&amp;quot;, @&amp;quot;Apple&amp;quot;, @&amp;quot;Banana&amp;quot;, nil];
    for (int i=0; i&amp;lt;[array count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Sorting Array&amp;quot;);
    array = [array sortedArrayUsingSelector:@selector(compare:)];
    for (int i=0; i&amp;lt;[array count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Saving Property List&amp;quot;);
    [array writeToFile:[@&amp;quot;~/Desktop/array.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES];
    
    NSLog(@&amp;quot;Mutable Array&amp;quot;);
    NSMutableArray *mutableArray = [NSMutableArray array];
    [mutableArray addObject:@&amp;quot;Apples&amp;quot;];
    [mutableArray addObject:@&amp;quot;Oranges&amp;quot;];
    [mutableArray addObject:@&amp;quot;Bananas&amp;quot;];
    for (int i=0; i&amp;lt;[mutableArray count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Removing object Oranges&amp;quot;);
    [mutableArray removeObjectAtIndex:1];
    for (int i=0; i&amp;lt;[mutableArray count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Dictionary&amp;quot;);
    NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@&amp;quot;Oranges&amp;quot;, @&amp;quot;Name&amp;quot;, @&amp;quot;Fruit&amp;quot;, @&amp;quot;Type&amp;quot;, [NSNumber numberWithBool:YES], @&amp;quot;Seeds&amp;quot;, nil];
    NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [dictionary objectForKey:@&amp;quot;Type&amp;quot;], [dictionary objectForKey:@&amp;quot;Name&amp;quot;]);
    [mutableArray insertObject:dictionary atIndex:1];
    for (int i=0; i&amp;lt;[mutableArray count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Saving Property List using NSPropertyListSerialization&amp;quot;);
    NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListXMLFormat_v1_0 errorDescription:nil];
    [xmlData writeToFile:[@&amp;quot;~/Desktop/mutableArray.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES];
    
    NSLog(@&amp;quot;Mutable Dictionary&amp;quot;);
    NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionary];
    [mutableDictionary setObject:@&amp;quot;Salad&amp;quot; forKey:@&amp;quot;Name&amp;quot;];
    [mutableDictionary setObject:@&amp;quot;Veggie&amp;quot; forKey:@&amp;quot;Type&amp;quot;];
    [mutableDictionary setObject:[NSDate date] forKey:@&amp;quot;Time&amp;quot;];
    [mutableDictionary setObject:[NSNumber numberWithBool:NO] forKey:@&amp;quot;Seeds&amp;quot;];
    NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [mutableDictionary objectForKey:@&amp;quot;Type&amp;quot;], [mutableDictionary objectForKey:@&amp;quot;Name&amp;quot;]);
    [mutableArray insertObject:mutableDictionary atIndex:0];
    for (int i=0; i&amp;lt;[mutableArray count]; i++) {
        NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]);
    }
    
    NSLog(@&amp;quot;Saving Binary Property List&amp;quot;);
    NSData *binaryData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
    [binaryData writeToFile:[@&amp;quot;~/Desktop/bina    ry.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES];
    
    [pool drain];
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker6-ArraysDictionariesAndPropertyLists/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker6-ArraysDictionariesAndPropertyLists/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker6-ArraysDictionariesAndPropertyLists/CocoaMaker6.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and John (@ZimiPoder), shows how Dictionaries, Arrays and Property Lists works in Cocoa. 12:40 Example code from episode. #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@&amp;quot;Array&amp;quot;); NSArray *array = [NSArray arrayWithObjects:@&amp;quot;Orange&amp;quot;, @&amp;quot;Apple&amp;quot;, @&amp;quot;Banana&amp;quot;, nil]; for (int i=0; i&amp;lt;[array count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]); } NSLog(@&amp;quot;Sorting Array&amp;quot;); array = [array sortedArrayUsingSelector:@selector(compare:)]; for (int i=0; i&amp;lt;[array count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]); } NSLog(@&amp;quot;Saving Property List&amp;quot;); [array writeToFile:[@&amp;quot;~/Desktop/array.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; NSLog(@&amp;quot;Mutable Array&amp;quot;); NSMutableArray *mutableArray = [NSMutableArray array]; [mutableArray addObject:@&amp;quot;Apples&amp;quot;]; [mutableArray addObject:@&amp;quot;Oranges&amp;quot;]; [mutableArray addObject:@&amp;quot;Bananas&amp;quot;]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Removing object Oranges&amp;quot;); [mutableArray removeObjectAtIndex:1]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Dictionary&amp;quot;); NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@&amp;quot;Oranges&amp;quot;, @&amp;quot;Name&amp;quot;, @&amp;quot;Fruit&amp;quot;, @&amp;quot;Type&amp;quot;, [NSNumber numberWithBool:YES], @&amp;quot;Seeds&amp;quot;, nil]; NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [dictionary objectForKey:@&amp;quot;Type&amp;quot;], [dictionary objectForKey:@&amp;quot;Name&amp;quot;]); [mutableArray insertObject:dictionary atIndex:1]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Saving Property List using NSPropertyListSerialization&amp;quot;); NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListXMLFormat_v1_0 errorDescription:nil]; [xmlData writeToFile:[@&amp;quot;~/Desktop/mutableArray.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; NSLog(@&amp;quot;Mutable Dictionary&amp;quot;); NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionary]; [mutableDictionary setObject:@&amp;quot;Salad&amp;quot; forKey:@&amp;quot;Name&amp;quot;]; [mutableDictionary setObject:@&amp;quot;Veggie&amp;quot; forKey:@&amp;quot;Type&amp;quot;]; [mutableDictionary setObject:[NSDate date] forKey:@&amp;quot;Time&amp;quot;]; [mutableDictionary setObject:[NSNumber numberWithBool:NO] forKey:@&amp;quot;Seeds&amp;quot;]; NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [mutableDictionary objectForKey:@&amp;quot;Type&amp;quot;], [mutableDictionary objectForKey:@&amp;quot;Name&amp;quot;]); [mutableArray insertObject:mutableDictionary atIndex:0]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Saving Binary Property List&amp;quot;); NSData *binaryData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil]; [binaryData writeToFile:[@&amp;quot;~/Desktop/bina ry.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and John (@ZimiPoder), shows how Dictionaries, Arrays and Property Lists works in Cocoa. 12:40 Example code from episode. #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@&amp;quot;Array&amp;quot;); NSArray *array = [NSArray arrayWithObjects:@&amp;quot;Orange&amp;quot;, @&amp;quot;Apple&amp;quot;, @&amp;quot;Banana&amp;quot;, nil]; for (int i=0; i&amp;lt;[array count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]); } NSLog(@&amp;quot;Sorting Array&amp;quot;); array = [array sortedArrayUsingSelector:@selector(compare:)]; for (int i=0; i&amp;lt;[array count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [array objectAtIndex:i]); } NSLog(@&amp;quot;Saving Property List&amp;quot;); [array writeToFile:[@&amp;quot;~/Desktop/array.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; NSLog(@&amp;quot;Mutable Array&amp;quot;); NSMutableArray *mutableArray = [NSMutableArray array]; [mutableArray addObject:@&amp;quot;Apples&amp;quot;]; [mutableArray addObject:@&amp;quot;Oranges&amp;quot;]; [mutableArray addObject:@&amp;quot;Bananas&amp;quot;]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Removing object Oranges&amp;quot;); [mutableArray removeObjectAtIndex:1]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Dictionary&amp;quot;); NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@&amp;quot;Oranges&amp;quot;, @&amp;quot;Name&amp;quot;, @&amp;quot;Fruit&amp;quot;, @&amp;quot;Type&amp;quot;, [NSNumber numberWithBool:YES], @&amp;quot;Seeds&amp;quot;, nil]; NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [dictionary objectForKey:@&amp;quot;Type&amp;quot;], [dictionary objectForKey:@&amp;quot;Name&amp;quot;]); [mutableArray insertObject:dictionary atIndex:1]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Saving Property List using NSPropertyListSerialization&amp;quot;); NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListXMLFormat_v1_0 errorDescription:nil]; [xmlData writeToFile:[@&amp;quot;~/Desktop/mutableArray.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; NSLog(@&amp;quot;Mutable Dictionary&amp;quot;); NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionary]; [mutableDictionary setObject:@&amp;quot;Salad&amp;quot; forKey:@&amp;quot;Name&amp;quot;]; [mutableDictionary setObject:@&amp;quot;Veggie&amp;quot; forKey:@&amp;quot;Type&amp;quot;]; [mutableDictionary setObject:[NSDate date] forKey:@&amp;quot;Time&amp;quot;]; [mutableDictionary setObject:[NSNumber numberWithBool:NO] forKey:@&amp;quot;Seeds&amp;quot;]; NSLog(@&amp;quot;Adding %@ with name %@&amp;quot;, [mutableDictionary objectForKey:@&amp;quot;Type&amp;quot;], [mutableDictionary objectForKey:@&amp;quot;Name&amp;quot;]); [mutableArray insertObject:mutableDictionary atIndex:0]; for (int i=0; i&amp;lt;[mutableArray count]; i++) { NSLog(@&amp;quot;%@&amp;quot;, [mutableArray objectAtIndex:i]); } NSLog(@&amp;quot;Saving Binary Property List&amp;quot;); NSData *binaryData = [NSPropertyListSerialization dataFromPropertyList:mutableArray format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil]; [binaryData writeToFile:[@&amp;quot;~/Desktop/bina ry.plist&amp;quot; stringByExpandingTildeInPath] atomically:YES]; [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker 5 - File Management</title><link>http://cocoa.mrgeckosmedia.com/2010/03/cocoa-maker-5-file-management.html</link><category>Cocoa</category><category>File</category><category>iPhone</category><category>Mac</category><category>Management</category><category>NSFileHandle</category><category>NSFileManager</category><category>NSFileWrapper</category><category>Objective-C</category><category>OSX</category><category>Programming</category><pubDate>Fri, 19 Mar 2010 23:11:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-4571856393426863073</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Noah (&lt;a href="http://rocknthesweater.com/"&gt;RockntheSweater.com&lt;/a&gt;), and Karl, explains how file managing works in c and cocoa.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker5-FileManagement/CocoaMaker5.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker5-FileManagement/CocoaMaker5Preview.png" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
7:49&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Example code from episode.&lt;br /&gt;
Files C Example&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

BOOL file_exist(const char *fileName) {
    FILE *file = fopen(fileName, &amp;quot;r&amp;quot;);
    if (file) {
        fclose(file);
        return YES;
    }
    return NO;
}

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    const char *ourFile = [[@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath] UTF8String];
    FILE *file;
    
    if (!file_exist(ourFile)) {
        file = fopen(ourFile, &amp;quot;w&amp;quot;);
        time_t currTime = time(NULL);
        fprintf(file, &amp;quot;%s: We just made this file.\n&amp;quot;, ctime(&amp;amp;currTime));
    } else {
        file = fopen(ourFile, &amp;quot;a&amp;quot;);
    }
    time_t currTime = time(NULL);
    fprintf(file, &amp;quot;%s: Here is a new line in this file.\n&amp;quot;, ctime(&amp;amp;currTime));
    fclose(file);

    
    [pool drain];
    return 0;
}
&lt;/pre&gt;Files Cocoa Exmaple&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSFileManager *manager = [NSFileManager defaultManager];
    NSString *ourFile = [@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath];
    NSFileHandle *file;
    
    if (![manager fileExistsAtPath:ourFile]) {
        [manager createFileAtPath:ourFile contents:nil attributes:nil];
        file = [NSFileHandle fileHandleForWritingAtPath:ourFile];
        [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new file.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]];
    } else {
        file = [NSFileHandle fileHandleForWritingAtPath:ourFile];
        [file seekToEndOfFile];
    }
    [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new line.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]];
    [file closeFile];
    
    [pool drain];
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker5-FileManagement/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker5-FileManagement/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker5-FileManagement/CocoaMaker5.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Noah (RockntheSweater.com), and Karl, explains how file managing works in c and cocoa. 7:49 Example code from episode. Files C Example #import &amp;lt;Foundation/Foundation.h&amp;gt; BOOL file_exist(const char *fileName) { FILE *file = fopen(fileName, &amp;quot;r&amp;quot;); if (file) { fclose(file); return YES; } return NO; } int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; const char *ourFile = [[@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath] UTF8String]; FILE *file; if (!file_exist(ourFile)) { file = fopen(ourFile, &amp;quot;w&amp;quot;); time_t currTime = time(NULL); fprintf(file, &amp;quot;%s: We just made this file.\n&amp;quot;, ctime(&amp;amp;currTime)); } else { file = fopen(ourFile, &amp;quot;a&amp;quot;); } time_t currTime = time(NULL); fprintf(file, &amp;quot;%s: Here is a new line in this file.\n&amp;quot;, ctime(&amp;amp;currTime)); fclose(file); [pool drain]; return 0; } Files Cocoa Exmaple #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSFileManager *manager = [NSFileManager defaultManager]; NSString *ourFile = [@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath]; NSFileHandle *file; if (![manager fileExistsAtPath:ourFile]) { [manager createFileAtPath:ourFile contents:nil attributes:nil]; file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new file.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; } else { file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file seekToEndOfFile]; } [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new line.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; [file closeFile]; [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Noah (RockntheSweater.com), and Karl, explains how file managing works in c and cocoa. 7:49 Example code from episode. Files C Example #import &amp;lt;Foundation/Foundation.h&amp;gt; BOOL file_exist(const char *fileName) { FILE *file = fopen(fileName, &amp;quot;r&amp;quot;); if (file) { fclose(file); return YES; } return NO; } int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; const char *ourFile = [[@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath] UTF8String]; FILE *file; if (!file_exist(ourFile)) { file = fopen(ourFile, &amp;quot;w&amp;quot;); time_t currTime = time(NULL); fprintf(file, &amp;quot;%s: We just made this file.\n&amp;quot;, ctime(&amp;amp;currTime)); } else { file = fopen(ourFile, &amp;quot;a&amp;quot;); } time_t currTime = time(NULL); fprintf(file, &amp;quot;%s: Here is a new line in this file.\n&amp;quot;, ctime(&amp;amp;currTime)); fclose(file); [pool drain]; return 0; } Files Cocoa Exmaple #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSFileManager *manager = [NSFileManager defaultManager]; NSString *ourFile = [@&amp;quot;~/Desktop/file.txt&amp;quot; stringByExpandingTildeInPath]; NSFileHandle *file; if (![manager fileExistsAtPath:ourFile]) { [manager createFileAtPath:ourFile contents:nil attributes:nil]; file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new file.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; } else { file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file seekToEndOfFile]; } [file writeData:[[NSString stringWithFormat:@&amp;quot;%@: Here is a new line.\n&amp;quot;, [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; [file closeFile]; [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker 4 - Loops and Goto</title><link>http://cocoa.mrgeckosmedia.com/2010/02/cocoa-maker-4-loops-and-goto.html</link><category>Arguments</category><category>Cocoa</category><category>for</category><category>Goto</category><category>iPhone</category><category>Loops</category><category>Mac</category><category>Objective-C</category><category>OSX</category><category>Programming</category><category>while</category><pubDate>Mon, 22 Feb 2010 10:41:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-1041536941898867949</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), and Karl, teaches how loops, arguments, and goto works in Cocoa.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker4-LoopsAndGoto/CocoaMaker4.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker4-LoopsAndGoto/CocoaMaker4-LoopsAndGoto.thumbs/CocoaMaker4_000900.jpg" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
15:35&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Example code from episode.&lt;br /&gt;
Loops Example&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    int i=0;
    while (i!=2) {
        NSLog(@&amp;quot;%d&amp;quot;, i);
        i++;
    }
    i=0;
    do {
        NSLog(@&amp;quot;%d&amp;quot;, i);
        i++;
    } while (i!=3);
    
    NSArray *anArray = [NSArray arrayWithObjects:@&amp;quot;Apples&amp;quot;, @&amp;quot;Oranges&amp;quot;, @&amp;quot;Grapes&amp;quot;, @&amp;quot;Bananas&amp;quot;, nil];
    for (int d=0; d&amp;lt;[anArray count]; d++) {
        NSLog(@&amp;quot;%@&amp;quot;, [anArray objectAtIndex:d]);
    }
    
    NSString *theObject;
    for (theObject in anArray) {
        NSLog(@&amp;quot;For In: %@&amp;quot;, theObject);
    }
    
    NSEnumerator *theEnumerator = [anArray objectEnumerator];
    while (theObject = [theEnumerator nextObject]) {
        NSLog(@&amp;quot;Enumerator: %@&amp;quot;, theObject);
    }
    
    [pool drain];
    return 0;
}
&lt;/pre&gt;Goto Example&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

void testGoto() {
    NSString *theString = [NSString new];
    if (1==12) {
        goto Error;
    }
    goto Cleanup;
Error:
    NSLog(@&amp;quot;An error occurred&amp;quot;);
    goto Cleanup;
Cleanup:
    NSLog(@&amp;quot;Releasing the string&amp;quot;);
    [theString release];
}

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    testGoto();
    
    [pool drain];
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker4-LoopsAndGoto/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker4-LoopsAndGoto/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker4-LoopsAndGoto/CocoaMaker4.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Karl, teaches how loops, arguments, and goto works in Cocoa. 15:35 Example code from episode. Loops Example #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int i=0; while (i!=2) { NSLog(@&amp;quot;%d&amp;quot;, i); i++; } i=0; do { NSLog(@&amp;quot;%d&amp;quot;, i); i++; } while (i!=3); NSArray *anArray = [NSArray arrayWithObjects:@&amp;quot;Apples&amp;quot;, @&amp;quot;Oranges&amp;quot;, @&amp;quot;Grapes&amp;quot;, @&amp;quot;Bananas&amp;quot;, nil]; for (int d=0; d&amp;lt;[anArray count]; d++) { NSLog(@&amp;quot;%@&amp;quot;, [anArray objectAtIndex:d]); } NSString *theObject; for (theObject in anArray) { NSLog(@&amp;quot;For In: %@&amp;quot;, theObject); } NSEnumerator *theEnumerator = [anArray objectEnumerator]; while (theObject = [theEnumerator nextObject]) { NSLog(@&amp;quot;Enumerator: %@&amp;quot;, theObject); } [pool drain]; return 0; } Goto Example #import &amp;lt;Foundation/Foundation.h&amp;gt; void testGoto() { NSString *theString = [NSString new]; if (1==12) { goto Error; } goto Cleanup; Error: NSLog(@&amp;quot;An error occurred&amp;quot;); goto Cleanup; Cleanup: NSLog(@&amp;quot;Releasing the string&amp;quot;); [theString release]; } int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; testGoto(); [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Karl, teaches how loops, arguments, and goto works in Cocoa. 15:35 Example code from episode. Loops Example #import &amp;lt;Foundation/Foundation.h&amp;gt; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int i=0; while (i!=2) { NSLog(@&amp;quot;%d&amp;quot;, i); i++; } i=0; do { NSLog(@&amp;quot;%d&amp;quot;, i); i++; } while (i!=3); NSArray *anArray = [NSArray arrayWithObjects:@&amp;quot;Apples&amp;quot;, @&amp;quot;Oranges&amp;quot;, @&amp;quot;Grapes&amp;quot;, @&amp;quot;Bananas&amp;quot;, nil]; for (int d=0; d&amp;lt;[anArray count]; d++) { NSLog(@&amp;quot;%@&amp;quot;, [anArray objectAtIndex:d]); } NSString *theObject; for (theObject in anArray) { NSLog(@&amp;quot;For In: %@&amp;quot;, theObject); } NSEnumerator *theEnumerator = [anArray objectEnumerator]; while (theObject = [theEnumerator nextObject]) { NSLog(@&amp;quot;Enumerator: %@&amp;quot;, theObject); } [pool drain]; return 0; } Goto Example #import &amp;lt;Foundation/Foundation.h&amp;gt; void testGoto() { NSString *theString = [NSString new]; if (1==12) { goto Error; } goto Cleanup; Error: NSLog(@&amp;quot;An error occurred&amp;quot;); goto Cleanup; Cleanup: NSLog(@&amp;quot;Releasing the string&amp;quot;); [theString release]; } int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; testGoto(); [pool drain]; return 0; } Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker 3 - Documentation</title><link>http://cocoa.mrgeckosmedia.com/2010/02/cocoa-maker-3-documentation.html</link><category>Cocoa</category><category>Documentation</category><category>iPhone</category><category>Mac</category><category>Objective-C</category><category>OSX</category><category>Programming</category><pubDate>Sat, 6 Feb 2010 21:09:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-3044139385546416485</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), Martin (&lt;a href="http://www.queenzsoftware.com/"&gt;QueenZSoftware.com&lt;/a&gt;), John (@&lt;a href="http://twitter.com/zimipoder"&gt;zimipoder&lt;/a&gt;), and Garrett, teaches how to read the documentation that comes with xcode.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker3-Documentation/CocoaMaker3.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker3-Documentation/CocoaMaker3-Documentation.thumbs/CocoaMaker3_000630.jpg" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
10:48&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker3-Documentation/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker3-Documentation/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker3-Documentation/CocoaMaker3.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Martin (QueenZSoftware.com), John (@zimipoder), and Garrett, teaches how to read the documentation that comes with xcode. 10:48 Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Martin (QueenZSoftware.com), John (@zimipoder), and Garrett, teaches how to read the documentation that comes with xcode. 10:48 Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker 2 - Syntax</title><link>http://cocoa.mrgeckosmedia.com/2010/01/cocoa-maker-2-syntax.html</link><category>Cocoa</category><category>iPhone</category><category>Mac</category><category>Objective-C</category><category>OSX</category><category>Programming</category><category>Syntax</category><pubDate>Sun, 31 Jan 2010 18:15:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-6457651794630620346</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), Noah (&lt;a href="http://blog.rocknthesweater.com/"&gt;RockntheSweater.com&lt;/a&gt;), and Martin (&lt;a href="http://www.queenzsoftware.com/"&gt;QueenZSoftware.com&lt;/a&gt;), teaches about the syntax of cocoa, how equations work in cocoa, how to do if statements, functions, and classes.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker2-Syntax/CocoaMaker2.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker2-Syntax/CocoaMaker2-Syntax.thumbs/CocoaMaker2_001860.jpg" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
33:56&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Example code from episode.&lt;br /&gt;
Example 1 - If Statements and Equations&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

int times(int value, int by);

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int value = 1230;
    NSLog(@"Value: %d", value);
    NSLog(@"Value: %d", value%500);
    NSLog(@"Value: %d", value/100);
    NSLog(@"Value: %d", times(value, 4232));
    
    if (value&amp;gt;1242) {
        NSLog(@"%d is greater then 1242", value);
    } else if (value&amp;gt;=1242) {
        NSLog(@"%d is greater then or equal to 1242", value);
    } else if (value&amp;lt;1240) {
        NSLog(@"%d is less then 1242", value);
    } else if (value&amp;lt;=1240) {
        NSLog(@"%d is less then or equal to 1242", value);
    }
    [pool drain];
    return 0;
}

int times(int value, int by) {
    int returnValue = value*by;
    return returnValue;
}
&lt;/pre&gt;&lt;pre class="code"&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Example 2 - Classes and Methods &lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;
#import "MGMCalculation.h"

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    MGMCalculation *calculation = [[MGMCalculation alloc] init];
    [calculation setAmount:572];
    [calculation setCurrencyExchange:3];
    int amount = [calculation calculate];
    NSLog(@"%d", amount);
    [calculation release];
    
    [pool drain];
    return 0;
}
&lt;/pre&gt;MGMCalculation.h &lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;

@interface MGMCalculation : NSObject {
    int amount;
    int currencyExchange;
}
- (int)amount;
- (void)setAmount:(int)theAmount;

- (int)currencyExchange;
- (void)setCurrencyExchange:(int)theCurrencyExchange;

- (int)calculate;
@end
&lt;/pre&gt;MGMCalculation.m &lt;br /&gt;
&lt;pre class="code"&gt;#import "MGMCalculation.h"

@implementation MGMCalculation
- (id)init {
    if (self = [super init]) {
        amount = 0;
        currencyExchange = 0;
    }
    return self;
}

- (int)amount {
    return amount;
}
- (void)setAmount:(int)theAmount {
    amount = theAmount;
}

- (int)currencyExchange {
    return currencyExchange;
}
- (void)setCurrencyExchange:(int)theCurrencyExchange {
    currencyExchange = theCurrencyExchange;
}

- (int)calculate {
    return amount*currencyExchange;
}
@end
&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker2-Syntax/Lesson.key"&gt;Keynote used in this Episode&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.archive.org/download/CocoaMaker2-Syntax/Lesson.pdf"&gt;Keynote in PDF Format&lt;/a&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker2-Syntax/CocoaMaker2.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Noah (RockntheSweater.com), and Martin (QueenZSoftware.com), teaches about the syntax of cocoa, how equations work in cocoa, how to do if statements, functions, and classes. 33:56 Example code from episode. Example 1 - If Statements and Equations #import &amp;lt;Foundation/Foundation.h&amp;gt; int times(int value, int by); int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int value = 1230; NSLog(@"Value: %d", value); NSLog(@"Value: %d", value%500); NSLog(@"Value: %d", value/100); NSLog(@"Value: %d", times(value, 4232)); if (value&amp;gt;1242) { NSLog(@"%d is greater then 1242", value); } else if (value&amp;gt;=1242) { NSLog(@"%d is greater then or equal to 1242", value); } else if (value&amp;lt;1240) { NSLog(@"%d is less then 1242", value); } else if (value&amp;lt;=1240) { NSLog(@"%d is less then or equal to 1242", value); } [pool drain]; return 0; } int times(int value, int by) { int returnValue = value*by; return returnValue; } Example 2 - Classes and Methods #import &amp;lt;Foundation/Foundation.h&amp;gt; #import "MGMCalculation.h" int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; MGMCalculation *calculation = [[MGMCalculation alloc] init]; [calculation setAmount:572]; [calculation setCurrencyExchange:3]; int amount = [calculation calculate]; NSLog(@"%d", amount); [calculation release]; [pool drain]; return 0; } MGMCalculation.h #import &amp;lt;Foundation/Foundation.h&amp;gt; @interface MGMCalculation : NSObject { int amount; int currencyExchange; } - (int)amount; - (void)setAmount:(int)theAmount; - (int)currencyExchange; - (void)setCurrencyExchange:(int)theCurrencyExchange; - (int)calculate; @end MGMCalculation.m #import "MGMCalculation.h" @implementation MGMCalculation - (id)init { if (self = [super init]) { amount = 0; currencyExchange = 0; } return self; } - (int)amount { return amount; } - (void)setAmount:(int)theAmount { amount = theAmount; } - (int)currencyExchange { return currencyExchange; } - (void)setCurrencyExchange:(int)theCurrencyExchange { currencyExchange = theCurrencyExchange; } - (int)calculate { return amount*currencyExchange; } @end Keynote used in this Episode Keynote in PDF Format</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Noah (RockntheSweater.com), and Martin (QueenZSoftware.com), teaches about the syntax of cocoa, how equations work in cocoa, how to do if statements, functions, and classes. 33:56 Example code from episode. Example 1 - If Statements and Equations #import &amp;lt;Foundation/Foundation.h&amp;gt; int times(int value, int by); int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int value = 1230; NSLog(@"Value: %d", value); NSLog(@"Value: %d", value%500); NSLog(@"Value: %d", value/100); NSLog(@"Value: %d", times(value, 4232)); if (value&amp;gt;1242) { NSLog(@"%d is greater then 1242", value); } else if (value&amp;gt;=1242) { NSLog(@"%d is greater then or equal to 1242", value); } else if (value&amp;lt;1240) { NSLog(@"%d is less then 1242", value); } else if (value&amp;lt;=1240) { NSLog(@"%d is less then or equal to 1242", value); } [pool drain]; return 0; } int times(int value, int by) { int returnValue = value*by; return returnValue; } Example 2 - Classes and Methods #import &amp;lt;Foundation/Foundation.h&amp;gt; #import "MGMCalculation.h" int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; MGMCalculation *calculation = [[MGMCalculation alloc] init]; [calculation setAmount:572]; [calculation setCurrencyExchange:3]; int amount = [calculation calculate]; NSLog(@"%d", amount); [calculation release]; [pool drain]; return 0; } MGMCalculation.h #import &amp;lt;Foundation/Foundation.h&amp;gt; @interface MGMCalculation : NSObject { int amount; int currencyExchange; } - (int)amount; - (void)setAmount:(int)theAmount; - (int)currencyExchange; - (void)setCurrencyExchange:(int)theCurrencyExchange; - (int)calculate; @end MGMCalculation.m #import "MGMCalculation.h" @implementation MGMCalculation - (id)init { if (self = [super init]) { amount = 0; currencyExchange = 0; } return self; } - (int)amount { return amount; } - (void)setAmount:(int)theAmount { amount = theAmount; } - (int)currencyExchange { return currencyExchange; } - (void)setCurrencyExchange:(int)theCurrencyExchange { currencyExchange = theCurrencyExchange; } - (int)calculate { return amount*currencyExchange; } @end Keynote used in this Episode Keynote in PDF Format</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item><item><title>Cocoa Maker Wallpapers</title><link>http://cocoa.mrgeckosmedia.com/2010/01/cocoa-maker-wallpapers.html</link><category>Desktop</category><category>Icon</category><category>Image</category><category>Wallpaper</category><pubDate>Mon, 25 Jan 2010 16:40:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-404930411208507707</guid><description>I made a icon for Cocoa Maker along with some wallpapers which I'm allowing you to download. I'm going to be using this wallpaper in my podcast for now on.&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker480.png" imageanchor="1"&gt;&lt;img border="0" height="300" src="http://mrgeckosmedia.com/Wallpaper/CocoaMaker480.png" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker480.png" imageanchor="1"&gt;&lt;/a&gt;Sizes&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker480.png"&gt;Download 640x480&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker768.png"&gt;Download 1024x768&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker800.png"&gt;Download 1280x800&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mrgeckosmedia.com/Wallpaper/CocoaMaker1200.png"&gt;Download 1920x1200&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Let me know what you think,&lt;br /&gt;
Mr. Gecko</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author></item><item><title>Cocoa Maker 1 - Getting Started</title><link>http://cocoa.mrgeckosmedia.com/2010/01/cocoa-maker-1-getting-started.html</link><category>Cocoa</category><category>Getting Started</category><category>iPhone</category><category>Mac</category><category>Objective-C</category><category>OSX</category><category>Programming</category><pubDate>Sun, 24 Jan 2010 16:52:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-572403463873011945.post-4206519934425642068</guid><description>James (&lt;a href="http://mrgeckosmedia.com/"&gt;MrGeckosMedia.com&lt;/a&gt;), joined by, Eduardo (&lt;a href="http://megaedux.com/"&gt;MegaEduX.com&lt;/a&gt;), Nick, and Karl, teaches the basics of installing Xcode, setting up a project and making a "Hello, World!" command line utility.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;embed controller="false" heigth="110" href="http://www.archive.org/download/CocoaMaker1-GettingStarted/CocoaMaker1.mp4" plugin="quicktimeplugin" src="http://www.archive.org/download/CocoaMaker1-GettingStarted/CocoaMaker1-GettingStarted.thumbs/CocoaMaker1_001800.jpg" target="quicktimeplayer" type="video/quicktime" width="160"&gt;&lt;/embed&gt;&lt;br /&gt;
30:16&lt;br /&gt;
&lt;/div&gt;Example code from episode.&lt;br /&gt;
&lt;pre class="code"&gt;#import &amp;#60;Foundation/Foundation.h&amp;#62;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSString *name = @"World";
    if (argc&gt;1) {
        name = [[[NSString alloc] initWithBytes:argv[1] length:strlen(argv[1]) encoding:NSUTF8StringEncoding] autorelease];
    }
    NSLog(@"Hello, %@", name);
    [pool drain];
    return 0;
}
&lt;/pre&gt;</description><enclosure length="0" type="video/mp4" url="http://www.archive.org/download/CocoaMaker1-GettingStarted/CocoaMaker1.mp4"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>cocoa@mrgeckosmedia.com (Mr. Gecko)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Nick, and Karl, teaches the basics of installing Xcode, setting up a project and making a "Hello, World!" command line utility. 30:16 Example code from episode. #import &amp;#60;Foundation/Foundation.h&amp;#62; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *name = @"World"; if (argc1) { name = [[[NSString alloc] initWithBytes:argv[1] length:strlen(argv[1]) encoding:NSUTF8StringEncoding] autorelease]; } NSLog(@"Hello, %@", name); [pool drain]; return 0; }</itunes:subtitle><itunes:author>Mr. Gecko</itunes:author><itunes:summary>James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Nick, and Karl, teaches the basics of installing Xcode, setting up a project and making a "Hello, World!" command line utility. 30:16 Example code from episode. #import &amp;#60;Foundation/Foundation.h&amp;#62; int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *name = @"World"; if (argc1) { name = [[[NSString alloc] initWithBytes:argv[1] length:strlen(argv[1]) encoding:NSUTF8StringEncoding] autorelease]; } NSLog(@"Hello, %@", name); [pool drain]; return 0; }</itunes:summary><itunes:keywords>Cocoa,Objective,C,ObjC,C,Program,Application,Make,Learn,Develop,James,Gecko,GRMrGecko</itunes:keywords></item></channel></rss>