Re: cocoa newbie questions
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