Jump to content

Cocoa Tutorial


  • Please log in to reply
32 replies to this topic

#21
Neilis

Neilis

    InsanelyMac Protégé

  • Members
  • PipPip
  • 74 posts
  • Gender:Male
  • Location:South Carolina, USA
Very, very cool. I'm new to the Mac platform but have developed with Borland C++ Builder and MS Visual Basic before, but Xcode and it's associated tools left me puzzled when I tried them. This is just the sort of thing I need to get a good feel for how to get a working interface created :).

#22
socal swimmer

socal swimmer

    socal swimmer

  • Members
  • PipPipPipPipPipPipPip
  • 914 posts
  • Gender:Male
  • Location:socal
  • Interests:swim, learning, computers
hey

that looks like a good tutorial. I don't want to hijack this thread, only add more useful information. i too have been learning cocoa recently. Here are a couple sites that I found useful:

a long series of articles, covering many important aspects of cocoa: http://www.macdevcenter.com/pub/ct/37 . the bottom ones are the oldest, and the most basic.

smaller site, also helpful: http://cocoadevcentral.com/

anyway, i hope these help others as much as they helped me.

btw, if i should post this in a separate thread, or forum, just tell me and i will (or mods can do it)

#23
stormj

stormj

    InsanelyMac Protégé

  • Members
  • Pip
  • 5 posts
  • Location:California
Would you mind taking a stab at updating this for xcode 3.0?

I'm fairly good with Cocoa, but I can't seem to get Interface Builder 3.0 to generate the source for my classes. I assume it instantiates when you drag one from the library over to your app window, but the generating source code step, I'm just not finding it.

The docs seem to imply that it should do it automatically (that would be nice) but it's not on mine, 9a559. Also, there is "Write Source Files..." but that makes files that are broken, and if you fix them, don't seem to operate.

I know it's some small simple thing I'm probably missing that Apple has made "easier."

Any ideas?

#24
ExpLoaDeD

ExpLoaDeD

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
i have the same problem ;)

#25
subnork

subnork

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
You have to make the classes in Xcode, drag them into Interface Builder, then instantiate NSObject and set it's class to the header you just dragged in.

#26
khaled_acmilan

khaled_acmilan

    InsanelyMac Sage

  • Retired
  • 418 posts
  • Gender:Male
  • Location:Egypt,Cairo
  • Interests:Programming,Graphics and football.
Thank you very very much for your Tutorial and your time to make this thing.

i made Application named it Khaled :( but i want to ask something please when i scroll in my application i get *** something like this but in your application (Slider) i get the numbers like this 65 or whatever and i check your application i found in it (delegate) in class outline how can i add this one and is this enable to see what i write in text field or another thing?.

Thank you very much and i will Upload my application to you and others :)

My Application:-

http://mt15.quicksha...khaled3186d.zip


Khaled

#27
gizmoarena

gizmoarena

    OS X fanatic

  • Members
  • PipPipPipPipPip
  • 266 posts
  • Gender:Male
  • Location:Melbourne, Australia
My first cocoa application :)
hehe, thanks a lot ^_^

#28
Teras

Teras

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts
Nice tutorial.

I'd suggest a step further down.
How can I make it, so when I leave the slider, the value also is printed in the console? (e.g. with printf?)


What I am trying to do is, how to connect "events" with real programming (and not only click & drag & drop)

EDIT: A more advanced totorial can be found here: http://forum.insanel...showtopic=91735

#29
iPhone-Guy

iPhone-Guy

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
I can't even seem to do the simpliest things.

I have 1 label that contains "1.23".
A 2nd label that has "4.56".
I want to add the values together... and display the total in a 3rd label.

> lblThree.text = (float)lblOne.text + (float)lblTwo.text;

I'm stumped.

Any help?

#30
StrongWind

StrongWind

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
Thanks for this tutorial, I will try it soon.

#31
jivhg

jivhg

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:in your house

I can't even seem to do the simpliest things.

I have 1 label that contains "1.23".
A 2nd label that has "4.56".
I want to add the values together... and display the total in a 3rd label.

> lblThree.text = (float)lblOne.text + (float)lblTwo.text;

I'm stumped.

Any help?


[lblThree setStringValue:[NSString stringWithFormat:@"%f", [lblOne floatValue] + [lblTwo floatValue], nil]];

Happy easter.

#32
iminzc

iminzc

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts
  • Gender:Male
if you want to image edit better get Adobe photoshop cs3 or cs4

remember the HP hands commercial that's from Adobe After effects

head over the www.lynda.com for the tutorials

#33
qreed

qreed

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
Thanks! Great tutorial :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy