• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can you "bind" two values into one?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you "bind" two values into one?


  • Subject: Re: Can you "bind" two values into one?
  • From: Keary Suska <email@hidden>
  • Date: Wed, 23 May 2007 10:12:06 -0600
  • Thread-topic: Can you "bind" two values into one?

on 5/23/07 9:44 AM, email@hidden purportedly said:

> Say that I have an NSTableView with two columns, firstName and
> lastName.  Say that some marketing hack insists that I store these
> combined as one string.

I say complain to the boss ;-) Marketing shouldn't have any say toward data
storage, and in any case should be fired for making such a bone-headed
requirement. But I digress.

> 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.  But I keep running into a
> wall, trying to transform two objects into one.  What's the smart way
> to do this?

Probably NSValueTransformer, but you are looking at a world of pain unless
you very strictly control data entry.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

References: 
 >Can you "bind" two values into one? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: views not released when window closed
  • Next by Date: (no subject)
  • Previous by thread: Can you "bind" two values into one?
  • Next by thread: Re: Can you "bind" two values into one?
  • Index(es):
    • Date
    • Thread