• 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: combining two entities to one binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: combining two entities to one binding


  • Subject: Re: combining two entities to one binding
  • From: Koen van der Drift <email@hidden>
  • Date: Sun, 02 Oct 2011 10:42:29 -0400

On Oct 2, 2011, at 10:11 AM, Keary Suska wrote:

> Unfortunately not in the binding text itself, at least AFAIK. There are a number of ways to do this, the most obvious being adding a method to your model class such as:
>
> - (NSString *)hardReturn
> {
> 	return @"\n";
> }
>
> and adding it to your bind pattern. I have to say though, that this begs for a dynamic property as I describe above. It is much more extensible and easier to debug.
>
> If, however, you find that you will need to insert carriage returns in a number of different bindings for a number of different model objects, you might consider using an NSFormatter that, for example, replaces occurrences of the string "\n" with a newline. You could also set a category on NSController for the method above, and have it available for any binding. Many options.


I ended up just using two text fields below each other each showing a property.    Of course, I now realize that the subject title is a bit misleading, I only have one entity with several properties.

- Koen._______________________________________________

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:

This email sent to email@hidden

References: 
 >combining two entities to one binding (From: Koen van der Drift <email@hidden>)
 >Re: combining two entities to one binding (From: Keary Suska <email@hidden>)
 >Re: combining two entities to one binding (From: Koen van der Drift <email@hidden>)
 >Re: combining two entities to one binding (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: combining two entities to one binding
  • Next by Date: CoreData Relationships and Array Controllers
  • Previous by thread: Re: combining two entities to one binding
  • Next by thread: How to make Lion's autosaving work for my application?
  • Index(es):
    • Date
    • Thread