Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

baddj

macrumors 6502
Original poster
Mar 4, 2009
353
35
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.
 
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.
 
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.
 
Go to the "Help" menu and select "Documentation" while within XCode. Then just type in the class you are looking for information on.
 
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).
 
Why not look at one of the dozens of sample apps that are included with XCode? They cover pretty much all of the basics.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.