Re: Dynamic menu building
Re: Dynamic menu building
- Subject: Re: Dynamic menu building
- From: Chris Hanson <email@hidden>
- Date: Fri, 15 Aug 2003 15:10:03 -0500
On Friday, August 15, 2003, at 12:54 PM, April Gendill wrote:
thusly the variable name in the loop means nothing outside the loop
and is only a reference used while actually creating that particular
submenu and adding items to it.
I think the key point is that usually a variable is just a reference to
an object. A variable isn't the object itself.
So when we write
NSString *myString = @"foo";
we may use shorthand and say "myString is 'foo'" but really what we
mean is "the variable myString currently refers to an NSString instance
with the value 'foo'."
An object's existence and its lifetime are independent of any variable
referring to the object, at least in Objective-C.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.