PDA

View Full Version : OMFG how the hell do you do this?




baddj
Aug 9, 2009, 03:09 AM
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.



Catfish_Man
Aug 9, 2009, 04:26 AM
You're pretty terrible at using Google. There's dozens of step by step tutorials out there, for a variety of skill levels.


- (IBAction) doStuff:(id)sender {
[someTextField setStringValue:@"Hooray text!"];
}


plus hooking up the button and textfield in Interface Builder.

baddj
Aug 9, 2009, 05:08 AM
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.

Guiyon
Aug 9, 2009, 07:32 AM
Go to the "Help" menu and select "Documentation" while within XCode. Then just type in the class you are looking for information on.

Sayer
Aug 9, 2009, 12:14 PM
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).

admanimal
Aug 9, 2009, 12:23 PM
Why not look at one of the dozens of sample apps that are included with XCode? They cover pretty much all of the basics.

jinksys
Aug 12, 2009, 04:11 PM
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).

IB does not generate source code, it generates nibs.

kainjow
Aug 12, 2009, 04:22 PM
IB does not generate source code, it generates nibs.

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.