• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strong language about Cocoa and Qt.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strong language about Cocoa and Qt.


  • Subject: Re: Strong language about Cocoa and Qt.
  • From: Prachi Gauriar <email@hidden>
  • Date: Tue, 01 Jul 2003 13:48:48 -0500

On Tuesday, July 1, 2003, at 10:58 AM, Rich Warren wrote:

Memory Management:

This was a big one for me. It took a long time before I felt that I really
understood what I was doing. And I still feel like I have to write a ton of
boilerplate whenever I add a member variable to a class. It would be nice if
Project Builder could automate this.

Oh but it can. Kind of. If you mean you want it to write init and dealloc methods for you, you should take a look at /Developer/ProjectBuilder Extras/Example Scripts/. Copy the contents of this folder into ~/Library/Application Support/Project Builder/ and you'll get some scripts to write accessors, comment out lines, insert HeaderDoc comments, etc. It would be pretty simple create scripts to have it write init and dealloc methods as well if that's what you want it to do. Unfortunately, I don't think that would be too useful in my experience. Chances are you'll make a lot of changes to those methods anyway.

Regardless, you can write the scripts in any scripting language that will run from the command-line, and AppleScript too, I think. If AppleScript isn't supported in PB 2.0, I believe it's supported in Xcode.

While most books and articles make it seem like a simple topic, it actually
can get quite complex. You need to make sure you don't create circular
references. You don't typically need to retain and release UI controls when
you access them... Etc. etc.

It really isn't that hard if you understand the lifetime of an object. The reason you don't retain/release UI controls is that you generally don't keep a reference for longer than the current iteration of the run loop. Also, NIB files have references that they keep, so you don't have to worry about those. The Stepwise articles on memory management are relatively straightforward, and I think they served me well when I started learning. Just try not to make it too hard. It really isn't bad. It's not automatic garbage collection, but that's oftentimes a good thing.

Strongly Typed vs. Dynamic:

Again, this is probably because of the way I've been trained, but using a
dynamic language always makes me a little uneasy.

<snip>

I have to point everyone who's making the transition from strong-typing to dynamic languages to this entry from Bruce Eckel's weblog <http://mindview.net/WebLog/log-0025>. Bruce (author of Thinking in C++ and Thinking in Java) used to be a die-hard strong-typing kind of guy, but now he lives a happier, more dynamic life... :-) Check out the blog entry. It's a good read.

Documentation:

Apples documentation doesn't include a search feature. Until someone on this
list suggested some third-party applications--this was a screaming
nightmare.

See Xcode's new documentation window. Fast search a la iTunes (and half of the other apps in Panther). It's much^n better.

-Prachi
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Strong language about Cocoa and Qt.
      • From: Jeff Harrell <email@hidden>
    • Re: Strong language about Cocoa and Qt.
      • From: Eric Wang <email@hidden>
References: 
 >Re: Strong language about Cocoa and Qt. (From: Rich Warren <email@hidden>)

  • Prev by Date: Help wanted with NSOutlineView and it's data source
  • Next by Date: Re: Strong language about Cocoa and Qt.
  • Previous by thread: Re: Strong language about Cocoa and Qt.
  • Next by thread: Re: Strong language about Cocoa and Qt.
  • Index(es):
    • Date
    • Thread