some problems i have com across...

Discussion in 'Mac Programming' started by sleyeu, Feb 14, 2010.

  1. sleyeu macrumors 6502

    Joined:
    Oct 18, 2009
    #1
    hello,

    i am going to try and make some mac and iphone apps however i dont know where to start! (never had programming experience)
    i have a book which is objective - c for dummies but that is a bore to read. it just keeps telling me to write some code down and then tells me to delete it. It does tell me what is does but his way of explaining doesnt fit with my way of learning. i am getting very frustrated for some reason, need a solution!

    Are there any youtube videos that show me how to make some basic stuff? (please... no manuals/reading on the internet. i have had enough of reading for today) i saw a video on how to make my own web browser in interface builder but then when i build and run in xcode it just gives me a blank window.

    And can someone give me like, a challenge on something to build? i must be code and using interface builder ( so i can make my own icons and animate it :)



    also, while trying to make something on the iphone compiler, i keep getting this message, - " Expected identifier or "(" before "(i cant see this symbol it so blurry)" token. what does this mean?


    p.s. how do i post code like i see in some peoples posts.
    p.s.s. is it worth trying to learn another language which is simpler to grasp some programming skills and learn how it works



    time to cool off my making some music on garageband...
     
  2. fernandovalente macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #2
    First, I suggest you to learn C and Logic Programming. There are many books that really sucks. Many people get disencouraged because of these books. I know a great Objective-C book called Cocoa Programming for Mac OS X. This one doesn't make you get tired and you really learn it easily. Believe me, this was my case.

    If I see you code, I will be able to tell you why Xcode is returning this error.

    To post code like people post, use the [ code ] tag(no spaces).

    I also can help you on iChat or MSN.
     
  3. sleyeu thread starter macrumors 6502

    Joined:
    Oct 18, 2009
    #3
    who's the author? i will look the book up.

    i looked through the website called www.cocoadevcentral.com/d/learn_objectivec/

    it is very good, if the book you recommended is like that then i think i will get it.

    Code:
     {
    
    	
    	
    	int a;
    	int b;
    	int c;
    	int answer;
    	
    	a = 1;
    	b = 2;
    	c = 3;
    	
    	answer = a + b;
    	
    	NSLog (@" 1 + 2 = %i", answer);
    }
    
    i was just messing around with this because some of this is in the book i have, now i have to know what this error means

    the error appears on the first curly brace
     
  4. Vaxuun macrumors member

    Joined:
    Feb 6, 2010
    Location:
    Denmark
    #4
    Code:
    #include <Cocoa/Cocoa.h>
    
    int main(){
    
    int a;
    int b;
    int answer;
    
    a = 1;
    b = 2;
    answer = a + b;
    
    NSLog(@"1 + 2 = %i", answer);
    }
    And even shorter
    Code:
    #import <Cocoa/Cocoa.h>
    
    int main(){
    	
    	int answer;
    	
    	answer = 1 + 2;
    	
    	NSLog(@"1 + 2 = %i", answer);
    }
    I don't see why you include int c; and c = 3; if you don't use it
     
  5. fernandovalente macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #5
    It's much better than Cocoa Dev Central.

    http://www.amazon.com/Cocoa-Program...=sr_1_1?ie=UTF8&s=books&qid=1266198186&sr=8-1

    The author is called Aaron Hillegass. He teaches programming at the Big Nerd Ranch.
     
  6. sleyeu thread starter macrumors 6502

    Joined:
    Oct 18, 2009
    #6
    i was going to do some more stuff but i was just compiling as i go incase i do something wrong.

    was gonna do all 9 combinations from just declaring the int values of a b c
     

Share This Page