Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where are the target and action variables?




Il giorno 30/ago/07, alle ore 20:45, Frank Bettger ha scritto:

But where are the instance variables target and action?

Directly accessing variables is usually a no-no in Cocoa; not because it's impossible, but because it makes for poor encapsulation (for example, it may be changed by anyone at any time, and you for example would not be able to retain the new value or release the old one).


Virtually all access is done via properties, which are pairs of - someValue/-setSomeValue: methods. Interface Builder should set the action *property*, which means calling -setAction: on the button. (See also the Cocoa docs on Key-Value Coding for more.)

 - ∞_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Where are the target and action variables? (From: "Frank Bettger" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.