Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

adding .h .m

I'm confused that when a new project is added, the .m file is added with a .h file that contains an initialization. The initialization would be very helpful, except that the titles are the same for both files, so that the intermediate .h (controller) and .m (model) files are missing. Either the user should be able to add .h,.m model and .h,.m control files all at once when a project is opened (which I think is better) or else the project should open with no files, and the user can select an empty .h or .m file to start building the project.

iMac

Posted on Jul 2, 2012 7:10 PM

Reply
25 replies

Jul 3, 2012 1:15 PM in response to mark133

If you think Cocoa is incomplete and half-baked then I suggest you stay far away from C++ and most other professional development environments. Few are as complete and full-featured as Cocoa.


Objective-C is based on C. In this language, functions and structures must be both defined (in a .h file) and implemented (in a .c or .m or .cpp) file. The implementation happens once and only once. The definition just establishes the existence and structure so that multiple different implementations can use the items defined. This definition vs implementation dichotomy is standard across virtually all languages and platforms.


"Copying and tweaking" does not do justice to what is required for software development. Even the best documented and detailed example code from Apple is insufficient for a real application. Software development is serious, professional activity. It is people's life work. Writing a computer program takes anywhere from months to years, depending on the application. It takes all the creativity of writing a book, and the technical knowledge to deliver said book to a reader on Mars. The Martians will give you poor reviews if they find grammatical errors in the book, regardless of how good the story is.

Jul 3, 2012 2:10 PM in response to etresoft

I think you didn't realize what I mean, that Cocoa is far from the final step in making core capabilities easily accessible to the average user (like myself).


I think Cocoa is half-baked in terms of meeting a popular market with a professional development kit. There is much more potential in bringing the core capabilities of modern development to a popular market.


Fortunately for developers who make their living at development, the greater technical knowledge of development means that the process will be slower than it was for media production. The last stand for the media moguls was an effort to prevent wide production and distribution of the tools for professional audio production. They have pretty much lost at that now.


The only great monopolies still standing are development, owing to its technical nature, academia, owing to the sheer numbers of people involved, and government. But education is rapidly decentralizing, and as knowledge is dispersed, it is more and more difficult to centralize and control.


But I am on the side of dispersing knowledge, of making complicated things simple, and of bringing light to ignorance. Many are against me, especially when they falsely believe that their livelihood depends on keeping a monopoly on their tools and their special knowledge. The future means faith and light, not ignorance and oppression.

Jul 3, 2012 9:12 PM in response to mark133

I just want to document the next step in my beginner learning process before I loose track of the learning process I've had to go through.


It's that if an object has a class method, it can be sent a message for that method directly to the implemented class, without the step of initializing an instance. But the instance methods require an instance to be allocated and initiated.


Ok. I'm done being a beginner. I think I'm on my own with the learning process, at this point.

adding .h .m

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.