Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > what is the laziest way I can program in cocoa ?

what is the laziest way I can program in cocoa ?
Thread Tools
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 3, 2006, 09:35 PM
 
Yeazh I can hear you now yelling get lost or read a book.. Well I did... I read a LOT of books.. I can now read code... and understand how they are working... BUT SHESH ! I wrote 20 minutes of code just to asign a color well to change the background color of the text window ... ARGGGgg Thats what I can a waist of time...


I read frameworks are called out and outlets are used to get stuff working... are there more frameworks online somewhere to use in osx to do more comon tasks and get further faster in my work ??

I craked open the sketch app in examples It's sooooo mesy .... and besides the notes state that it is not made for real work handling ...

Call me what you will but the less I have to code the faster I can get the app done..
     
Junior Member
Join Date: Apr 2005
Status: Offline
Reply With Quote
Jun 3, 2006, 11:03 PM
 
Well, I am going to suggest something diffrent here. Have you tried Realbasic? you can take a look at it at www.realbasic.com I suggest it because the Max OSX apps it generates now are Carbon but they are suppose to be Cocoa in the next release. It might be easier then the route you're taking now. I have had an application developed in RB and it turned out good.
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 3, 2006, 11:50 PM
 
Err if the apps are faster this round I can try it.. last I recall the apps were subpar speed at best ..

I DID find something that will help me in the endeavor, Cocoa Bindings, and frameworks libraries just need to find some header file now
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 4, 2006, 12:41 AM
 
"Less code is better code" is basically the Cocoa motto. That's the whole idea behind Interface Builder, Cocoa Bindings and Core Data. In a simple case, those layers together can create a whole MVC-style program without a line of code.

On the other hand, I kind of wonder how it took you "20 minutes of code" to have a color well change a text view's background color. All it takes is a one-line IBAction along the lines of [textView setBackgroundColor:[sender color]].
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 4, 2006, 01:07 AM
 
I was just following the coca programming for mac osx
Addison wesley BNR book... typeing letter for letter ,, and reading as I go along... I hate these books they just go on and on with talk and examples of talk before you get in the code..

I just want rules and how they work .. and how to make it smaller faster better .. full use of frame works and whatnot to get the job done
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jun 4, 2006, 04:18 AM
 
Well, you need to understand the concepts before you can apply them to new situations. Otherwise all you'll be able to do is fiddle with examples that other people have written to adapt them to slightly different situations, and cobble together apps which kind of sort of work (if you're lucky).
     
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jun 4, 2006, 05:03 AM
 
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 4, 2006, 06:04 AM
 
Hee. Well, it looks like he's taking my advice (which I kind of forgot I gave) and figuring out how to make things himself, so hey.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 4, 2006, 08:05 AM
 
Originally Posted by PurpleGiant
I get the feeling this thread may end up like:

http://forums.macnn.com/showthread.php?t=234397
But in the case there I did not know enough cocoa to get the understandig of the programming...

But now after useing Dashcode on a macbook I see how apple gets it, and it proves a little of the idea.. Honestly though I still dont understand why it is such a hard concept for others..
It's an OO Object model that after I found cocoa bindings makes ever more sence to me now..

But this is a thread about finding the least amount of code not the other..
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 14, 2006, 12:20 PM
 
Ok so I re read the Sketch app.. Ughhh eeeggg,, ackkkkkk Eeekkk pain in head... blister in foot... Ouch liquid aand coffeee needed *moooore*


Kay

So it's quite messy.. Should I try and clean it up ?? Are there better examples around ? I can't find any lively web forums that reply to questions fast enough... If I am to learn this I can't do it like the hide in my room for weeks at a time system.. I need guidence from someone maybe via ichat .. Tired the mailing list but they seem quite angry if I ask basic questions...

I dont want some one to do it for me.. Just need a helpful voice..

Oh And Does Sketch app follow MVC just so I know what I am reading ??
     
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Jun 14, 2006, 01:14 PM
 
Originally Posted by Chuckit
"Less code is better code" is basically the Cocoa motto. That's the whole idea behind Interface Builder, Cocoa Bindings and Core Data. In a simple case, those layers together can create a whole MVC-style program without a line of code.

On the other hand, I kind of wonder how it took you "20 minutes of code" to have a color well change a text view's background color. All it takes is a one-line IBAction along the lines of [textView setBackgroundColor:[sender color]].
Yea, in 10.3 and 10.4, it's honestly a rather small amount of code.
I personally always vouch that you should include AIUtilities.framework in your code (Adium devs ftw), because it handles alot of stuff for you, and has more than a few useful functions. (I should know, I wrote the background setting code as a category on NSTextView.)
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 14, 2006, 02:29 PM
 
Originally Posted by King Bob On The Cob
I personally always vouch that you should include AIUtilities.framework in your code (Adium devs ftw)
http://trac.adiumx.com/browser/trunk...ource?rev=9732

Is it free to use in my project ?? Createtive commons or some such license like that ??
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 14, 2006, 02:35 PM
 
It says at the top of the source that it's under the GPL (which is a viral license, so watch out if you're making shareware).
(Last edited by Chuckit; Jun 14, 2006 at 02:46 PM. )
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Jun 14, 2006, 03:20 PM
 
We wanted to bring it to a BSD license really, but it's just not feasible at this point. :-\
     
loren s  (op)
Senior User
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 14, 2006, 03:30 PM
 
Cool! I'll give it a good read..

Hmm soo it's looking like this with the MVC

Canvas, Mouse input ... check to see if others items will inter colide via padding margin, Send signal to cordnates file, turn cornates to interger pixels, send new integer to edit slots awaiting new cord numbers in source code page of css,

Errrr something like that

Bah! thats not including em
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2