Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (94)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • here's a note: don't use objective c, it's nothing like the original c. If you want a programming language like C but uses oop, choose C++.

  • @Taking1n1 this is for people who want to do iPhone / iPad development, so there's basically no choice. Thanks, Apple!

  • @SuperAndrei82 really? iphone and ipad only use objective c? damn you apple why not let us use c++/c !?!?!

  • @Taking1n1 you can use Dragonfire SDK if you want to use Windows and C++ to create iOS apps.

    But it costs moneyz :( and I couldn't find a reliable "free" version.

  • @S7347TH7 oh thx

  • You forgot to release "bucky" ;)

  • I dont understand the return command

  • HI there. Thank you very much for your nice tutorials. I am using xcode 4.2. So I am having problem with some codes. It is giving error when i put " NSautorelease" and when i want to put " -(int) age{ return age;

    }

    Please check.

  • thank u

  • oder:

    Erstellt eine eigene get und set Methode in der set Methode kann man dann zb. Sachen wie eine Speicherverwaltung einbauen

    -(void) setAge: (int) value

    (

    if(value != age)

    (

    [age release];

    age = [value retain];

    )

    )

  • @MusiumSw er kann kein deutsch glaub ich mal

    

  • Implementiert das Property in der Klasse @synthesize year;  (Implementiert das Property und erstellt get und set Methode)

  • OK das erst was ich sagen möchte: deine Tutorials sind echt super, mach weiter so!!!

    für alle die sich fragen was es mit dem get & set auf sich hat:

    get => schreibt einen Wert in eine Variable (dir. Namen = [PropertyName])

    set => holt einen Wert aus einer Variable (idr. Name -0 set[PropertyName])

    Und für die, welche es sauber haben wollen:

    - Erstellt ein Property im Interface @property int age;

  • @MusiumSw der ist englisch

  • Hey bucky i tried to gave them a name like [amit setAge: 23]; [amit setWeight: 300];  [amit setName: amit]; [amit print]; [amit release];

    it return an number ...

  • @xxx9888888888 2011-08-27 22:11:46.989 tutorial[2443:707] I am 1131856 and my age is 23 years old and weight 300 pounds

    2011-08-27 22:11:46.991 tutorial[2443:707] I am 0 and my age is 12 years old and weight 180 pounds

    result

  • instead of creating the method to set age or get the age, can you not simply use the following in the main:

    bucky.age=25;

    bucky.weight=200;

    NSLog(@"Bucky is %i and weighs %i",bucky.age,bucky.weight);

    Is there any benefit to using methods over the above?

  • @nineyardslong

    In my opinion we should put it outside the main function because main function is usually contain the output not the variable(i believe its call the "good style"). And also the method can be reuse which is helping you when you writing some large program.

  • @nineyardslong It's called encapsulation and good style. If you can just access it easily and do whatever you want with it, what if you accidentally do something stupid with the member? Technically, it is also bad to use unnecessary getters and setters. If you are writing a game involving people with age, instead of saying "setAge:n", you should use something like "increaseAge" which would then add 1 to its own age. This keeps control, stability, and happiness in third world countries.

  • @nineyardslong the advantage over the above with methods is the possibilities of more complex methods, say, a method for dog years, which would multiply your age by seven and return that.

  • so youre typing an age in main, so that it can be set in a method. so that a different method can get that number. and return it to main?

    seems like a big circle

  • okay, i couldn't have been the only one who saw "switching to process 1337"

  • I'm getting two errors and I dont know what to do :(

    "Expected ] before drain"

    and Array subscripts is not an integer. HELP!

  • @revengestor make sure you put semicolons after statements

  • @WideAngleDan The first methods we wrote were "setter" methods. This means that they set the value of the age and/or weight variables. A "getter" method will return the value of age and/or weight without changing the value. Bucky doesn't do a great job explaining data encapsulation here, and its sort of an advanced topic for this early on. As you become a more proficient programmer, you will see the need to "get" a variable, and "protect" the ability to "set" it to something else.

  • What about [bucky release]; ?

  • i just don't understand one thing...

    what does "return a variable" means??

    what is return???

  • @TexasRable Bucky breaks things down to a level where programmers who know other languages can understand him, but a complete noob may be lost at times. Don't worry!

    A variable is a piece of information stored in a computer. Like a number. There are different kinds of variables, or data-types. Returning a variable asks the computer to provide the information stored in the variable. For example, lets say we have an integer called X, and it equals 10. Returning X would give you the value 10.

  • @Spaeth1208 thank you very much!!! and thanks for calling me noob... :D

  • nice ....Thx...

  • @WideAngleDan Yep, aka an accessor method.

  • IM SO CONFUZZLED!!!!!

  • Comment removed

  • Comment removed

  • How do you spell gidder?

  • Hi Bucky  GREAT JOB I m learning from you. I have a question though how do you put your face on the screen, while you re speaking ?

  • so basiclly its like pointers so we can give the age and weight to some other variable in the main right?

    like

    int a = [bucky weithh];

    int b = [bucky age];

  • you could save so much time and work if you just set those vars as properties.

  • Thanks for the tutorials--it is all starting to make sense for this Visual Basic .Net "hack" programmer! You do a great job!

  • how does the programme differentiate between accessing variables and looking for that return 0;.

    if the variable happened to be 0, would the programme end?

  • That makes sense. Question? What if you wanted to make 1000 objects. You don't want to type 1000 times. How do you programmatically do make 1000 objects of same class?

    Thanks for the tutorial.

  • @Bilal434 you would probably have to write a program to write out all those objects for you. or create a loop that creates random object names, but those objects would only be temperary, because they would only be created when the program runs. other wise you have to type it out.

  • @Bilal434 You could make an Array of the Object.

  • @Bilal434

    you need to use loops to run 1000 objects...

  • You know, you people can always install Mac OSX (Hackintosh) On your computers... Thats what i did and its workin a treat :P

  • I am lost ... When i will get my mac first i will try it side by side so that i can also implement my knowledge and my classes are not confused :D

  • bucky did you learn all this from books?

  • hey bucky i don't have MAC OS...

    I've windows vista....

    How can I learn this Objective-c

  • Is it ok thats I am totally lost?

  • @MrSportsNerd

    ummm ... me too LOL

  • 4658 views :D

  • Where did your face go? =(

  • Btw why isnt there [bucky release]???

  • @Shazcapade There's no need to release memory from bucky because it is the only object in the program. [pool drain] covers this sufficiently. If you had [bucky release]...

    [bucky release]; (drains the memory from the object bucky, which is the only object in the program)

    [pool drain]; (drains the memory you just drained)

    so basically, it's redundant.

  • Now I get it, the print outs for the previous videos are gotten from the implementation section.. While this is the main section.. It doesn't look that much confusing like the previous time I saw this vid lol...

  • Why would you want to do this in an application?

  • this is all new to me... still fairly confusing but your vids are great keep it up

  • Can someone clarify? Why is this different from the previous tutorial that uses the print method?

  • oh man an other confusing one but again i got some of it down. I guess ill just rewatch it like ten more times lol...great job.

  • this is my second programming language that i am learning i started in Visual Basic visual basic looks simple with a few confusing things here and there and learning visual basic before learning this makes learning Objective C easy there are very few differences just how to enter the language , methods, classes, constructors(you have not learned them yet i don't think in these) all the same just called slightly differently

  • When you type, stuff appear. How do we do that?

    thx

  • how can we switch from one cell to another cell...(1 to 2 to 3 views).In 1st View (displaying great names upto 10).

    2nd view (displaying some text like quotation of his writing).

    3rd view (displaying the briefly description)

  • I ma new to Objective C , tutor's from 1 to 8 are very helpful to me and I hope the same for other too.....!!!!Eagerly waiting for the next tutors....!! Thank u Bucky

  • Awesome! Can't wait for the next one =D.

  • i have a queedstion. what language would i need to learn to make flash games?

  • @11wesley11 actionscript

  • actionscript

  • I'm with you there man. I want a mac soooo bad so I can start teaching myself Objective C.  ANOTHER GREAT TUTORIAL BUCKY!!!

  • @niktutos You can edit videos in Camtasia.. Lol

    But Premire pro is better for video editing, becouse After effect is for effects, like light sabers and stuffs

  • i wish i had a mac now!!!!!! :p

  • dude I love all that you're doing! Your tutorials lay down a basic foundation for me! Thanks keep it up!

  • In Obj-C, does @synthesize automate the process of creating the setter/getter methods?

  • bucky could you please tell me wich screen recorder you use on windows?

  • @niktutos He is using Camtasia

  • @Fpsdown I can't edit vids from Camtasia

    with Adobe Premiere Pro and After Effects

    Did you know which codecs i should use?

    Sorry about my english :p

  • @niktutos He's using CamTasia.

  • camstudio

  • he uses camtasia i think

  • Bucky man, I love all of your video's, they're super awesome.... but just wondering, could you PLEASE do another Java game development tutorial? Been refreshing EVERY day for like months and I'm forgetting what I've learned... :( Thanks!

  • oc8, xD

  • good to see u spending so much of ur time for these tuts.

    Good job and thanks

  • thx for those.... suppose will have to get a mac now... he he he... but please if you have spare time continue the java tutorials :) thx man you are great

  • Comment removed

  • can someone please tell me, what this is? i mean what is this creating?

  • This is Objective C Programming for the Mac / iPhone. Bucky has finally seen sense and moved to the Mac :p so he is kindly sharing his knowledge with us and showing us how to code in xcode. Once we are comfortable with it I'm sure he will move on to the actual building of a Mac / iPhone application.

  • would this also work for itouch?

  • @agentee7- Yes.

  • It's working now bucky I can see it perfectly.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more