Radio and PodcastRadio and PodcastLive Radio & Podcasts
Cocoa Maker 2 - Syntax artwork
Technology

Cocoa Maker 2 - Syntax

Cocoa Maker by Mr. Gecko

Feb 1, 2010Technology

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,...

About This Episode

Cocoa Maker 2 - Syntax is an episode from Cocoa Maker by Mr. Gecko. James ( MrGeckosMedia.com ), joined by, Eduardo ( MegaEduX.com ), Noah ( RockntheSweater.com ), and Martin ( QueenZSoftware.com ), teaches about the syntax of cocoa, how eq...

Podcast

This episode belongs to Cocoa Maker.

Listen Online

Use the player on this page to stream the episode online.

Episode Details

Published Feb 1, 2010, audio available.

Questions About This Episode

What is Cocoa Maker 2 - Syntax about?

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 <Foundation/Foundation.h> 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>1242) { NSLog(@"%d is greater then 1242", value); } else if (value>=1242) { NSLog(@"%d is greater then or equal to 1242", value); } else if (value<1240) { NSLog(@"%d is less then 1242", value); } else if (value<=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 <Foundation/Foundation.h> "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 <Foundation/Foundation.h> @interface MGMCalculation : NSObject { int amount; int currencyExchange; } - (int)amount; - (void)setAmount:(int)theAmount; - (int)currencyExchange; - (void)setCurrencyExchange:(int)theCurrencyExchange; - (int)calculate; @end MGMCalculation.m "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

Where can I listen to Cocoa Maker 2 - Syntax?

You can listen to Cocoa Maker 2 - Syntax online on Radio and Podcast. Open the player on this page to stream the available audio.

Which podcast is Cocoa Maker 2 - Syntax from?

Cocoa Maker 2 - Syntax is an episode from Cocoa Maker by Mr. Gecko.

How long is this episode?

The episode duration depends on the source podcast feed and may not always be available.

When was this episode published?

This episode was published on Feb 1, 2010.

Can I save Cocoa Maker 2 - Syntax for later?

Yes. Use the heart button on the episode page to add it to your favorite episodes list.

Are there related episodes from Cocoa Maker?

Yes. This page shows related episodes from Cocoa Maker when more episodes are available from the podcast feed.

Quick Answers About This Episode

Where can I listen to Cocoa Maker 2 - Syntax?

You can listen to Cocoa Maker 2 - Syntax on this page when the episode audio is available from the podcast feed.

Which podcast is this episode from?

Cocoa Maker 2 - Syntax is from Cocoa Maker by Mr. Gecko.

What are the episode details?

Published Feb 1, 2010