On 14 Mar '08, at 6:20 PM, norio ota wrote:

I set an action to a NSDatePicker and I'd like to know if an input value , especially year component, is different from the year of its previous date in the action method, without having a placeholder for the previous value.

Use key-value observing (KVO). You can configure it to tell you the old as well as the new value. It's all described in great detail in the documentation; read it carefully, because it gets quite tricky, though. For just this one case, it might be simpler just to store the previous value in an instance variable...

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to