• 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: cocoa newbie questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa newbie questions


  • Subject: Re: cocoa newbie questions
  • From: John Hörnkvist <email@hidden>
  • Date: Mon, 5 Nov 2001 16:08:04 +0100

On Monday, November 5, 2001, at 03:52 PM, Lieven Dekeyser wrote:

- can anyone explain me the whole autorelease/release/retain thing? And
how do the Cocoa classes use them? when do you need to send release to an
object created by a cocoa class? for example:

NSArray * array = [NSArray arrayWithObject:@"foo"];

do you need to call [array release] at the end of the function? Or is the
array automatically released?

Several articles at <http://www.stepwise.com/StartingPoint/Cocoa.html> cover this.

- I'd like to be able to drop files on my NSScrollView and add the file
paths (NSStrings) to it. How can I do that? The AppKit documentation is
not very clear... "description forthcoming" :-(

Generally you don't use the scroll view itself for such things; you use the contained view.

Read up on NSPasteboard.

You may also find useful things in the HTML Editor tutorial at Stepwise. (I don't recall if Scott ever got that far.)

Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com


References: 
 >cocoa newbie questions (From: Lieven Dekeyser <email@hidden>)

  • Prev by Date: gcc errors
  • Next by Date: Re: gcc errors
  • Previous by thread: cocoa newbie questions
  • Next by thread: Re: cocoa newbie questions
  • Index(es):
    • Date
    • Thread