OMFG how the hell do you do this?

Discussion in 'Mac Programming' started by baddj, Aug 9, 2009.

  1. baddj macrumors 6502

    Joined:
    Mar 4, 2009
    #1
    Hello.

    I have been trying for over 3 hours trying to make a button change text in a textfield but all i get is errors a baby can code something like this in windows but not in OSX ;) so hows it done and do not say the google word coz i have done that.
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2
    You're pretty terrible at using Google. There's dozens of step by step tutorials out there, for a variety of skill levels.

    Code:
    - (IBAction) doStuff:(id)sender {
        [someTextField setStringValue:@"Hooray text!"];
    }
    
    plus hooking up the button and textfield in Interface Builder.
     
  3. baddj thread starter macrumors 6502

    Joined:
    Mar 4, 2009
    #3
    Sorry for my mood but i had a windows programmer trying to help me and he was getting ****** at xocde and it was passing onto me.

    ill give that ago but whats the best place to get a good refrense on the valuables like setStringValue etc.
     
  4. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #4
    Go to the "Help" menu and select "Documentation" while within XCode. Then just type in the class you are looking for information on.
     
  5. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #5
    Yeah once you get it down, making a Cocoa app is fairly easy for most things.

    Just don't forget you connect the UI elements in Interface Builder. In fact a new app should start in Interface Builder, which can generate source code files that match the UI elements (naming conventions, links to classes).
     
  6. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #6
    Why not look at one of the dozens of sample apps that are included with XCode? They cover pretty much all of the basics.
     
  7. jinksys macrumors newbie

    jinksys

    Joined:
    Dec 16, 2008
    Location:
    Saint Louis, Mo
    #7
    IB does not generate source code, it generates nibs.
     
  8. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #8
    You can define a new class and add actions and outlets to it in IB, and then use File > Write Class Files to write it to file.
     

Share This Page