Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

cocoa question.....

Name: Anonymous 2010-11-12 16:58

So /prog/...

Can anyone show me a code snippet of cocoa that will create a simple window/pushbutton? All the cocoa tutorials revolve around interface builder, yet all I don't need any fancy GUI tools to design a program...

Name: Anonymous 2010-11-12 17:03

cocoa is for mac fags,no one likes you

Name: Anonymous 2010-11-12 17:12

>>2

Hey man, I want to learn to develop for multiple platforms....

Name: Anonymous 2010-11-12 17:15

>>3
Use C.

Name: Anonymous 2010-11-12 17:16

and yet you pick cocoa,``Faggot''

Name: 1,3 2010-11-12 17:17

So /prog/.........................................................................................

I am gay....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Name: Anonymous 2010-11-12 17:19

>>4
>>5

I would prefer to do things natively for each system.

Cocoa is the best framework for developing applications on the Mac, so I will use that.

Name: Anonymous 2010-11-12 17:21

>>7
why are you programming for hipsters anyway?

Name: Anonymous 2010-11-12 17:30

>>8

Hipsters that are willing to pay so much for one computer and for useless fart apps on their phones must be easy money.

Also, flexibility in jobs.

Name: Anonymous 2010-11-12 17:31

>>9
well if you're going to take advantage of the retarded then at least learn to write your own window and pushbutton UI code

Name: Anonymous 2010-11-12 17:33

>>10

Or just use QT4 and say fuck em all?

Name: Anonymous 2010-11-12 17:48

But seriously though, why are there no instructions on how to do it without interface builder?

Name: Anonymous 2010-11-12 17:54

>>12
because they assume you can do basic UI stuff.

Name: Anonymous 2010-11-12 18:06

>>13

I can, but that's not how I want to design my program. I want to physically write the code that generates the window.

Not too hard in QT, all it has to look like is:

#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[]) {
    QApplication lol(argc, argv);
    QPushButton hey("Hello World!");
    hey.resize(100, 30);
    QObject::connect(&hey, SIGNAL(clicked()), &lol, SLOT(quit()));
    hey.show();
    return lol.exec();
}

Name: Anonymous 2010-11-12 18:06

p̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏

Name: Anonymous 2010-11-12 18:16

>>15

Hi Zalgo!

Name: Anonymous 2010-11-12 18:46

>>16
H̢̱̣̳̲́̅̅̅̅̅ĩ̠̓̓ʹ̪̫͍̓̿! ͪͣͤͤ͢͡

Don't change these.
Name: Email:
Entire Thread Thread List