Re: Can you "bind" two values into one?
Re: Can you "bind" two values into one?
- Subject: Re: Can you "bind" two values into one?
- From: mmalc Crawford <email@hidden>
- Date: Wed, 23 May 2007 09:55:52 -0700
On May 23, 2007, at 8:44 AM, Jerry Krinock wrote:
For the last hour, I've been trying to figure out how to bind two
table columns such as this to a single string in storage,
bidirectionally, using Cocoa bindings.
Bidirectionally you can't (in the read-only direction you can use
pattern values).
But I keep running into a wall, trying to transform two objects into
one. What's the smart way to do this?
In your model class, implement accessors for fullName.
-fullName returns the appropriate concatenation of firstName and
lastName.
-setFullName: parses the input parameter into firstName and lastName
and sets their values.
Also implement validateFullName:error: to validate the input value to
ensure it can be parsed (and probably set the Validates Immediately
option on the text field).
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden