tags:

views:

32

answers:

3

So I know a bit of C, trying to jump into ObjC for Max apps. Trying to figure out the terms and just needed a guru to humor me.

So an object could be thought of as a house that holds operations and data together.

But there may be many different objects of the same kind, called an instance. This could be thought of as a trailer park (manufactured home community) with a bunch of object homes. Not sure how to give an example of a type however.

Following same example, the methods would be the way the data in the house is manipulated?

Trying to figure these definitions out in a very simple example for my brain :)

A: 

Stop using these analogies, just start playing around with tutorials and the code, you will get the hang of what everything does in no time.

In my words I would call methods a collective of instructions that you can call on with the given method name.

But really, just start writing code, the rest will come :) (no copy pasting!!)

Romansky
A: 

What you're asking has little to do with Objective-C specifically, and everything to do with Object-Oriented Programming. Read up on that before diving into the new language!

Nick Veys
A: 

It sounds more like you need some education on Object Oriented Programming in general rather than Objective-C specifically. Do some googling for general OOP references. Here's some basics referring to your specific question:

Object: A general term for a combination of data and related operations
Class: A specific definition of an object, i.e. NSController
Instance: A specific object created from a Class definition

So, I could have an object Controller1, that is an instance of the NSController class. This could be referred to as an "NSController object" or an instance of "NSController".

phoebus
@phoebus @Nick, yeah looks like I need to read up on OOP a little first. Hopefully my basic knowledge of C will help or no?
HollerTrain
Your C knowledge will help with syntactical examples, and understanding the concept of a C struct will help you get the idea of a class encapsulating data and methods.
phoebus