• 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: Cocoa bindings one- or bi-directional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa bindings one- or bi-directional


  • Subject: Re: Cocoa bindings one- or bi-directional
  • From: Zdzislaw Losvik <email@hidden>
  • Date: Fri, 27 May 2005 12:41:47 +0200

Apple's NSView subclasses override bind:toObject:withKeyPath:options: with their own functionality.

I mean it is a pity that so much additional code has to be written. I would expect to call bind... to connect two variables in my MC -V model and that should be sufficient. I want a value in Controller (Model) to be synchronized with value in View. Nothing more, nothing less.

It seems to me that right now to do that I must override view's bind... method just as illustrated in joystick's example. IMHO would be much better if NSObject's bind... would create a bi-directional link between variables where each of them would be observing another.

The only risk I can is that poor implementation of bindings in this case would cause an infinitive loop of A=>B, B=>A, A=>B in KVC/KVO.

Zdzislaw Losvik


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Cocoa bindings one- or bi-directional (From: Zdzislaw Losvik <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Kay Roepke <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: mmalcolm crawford <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Zdzislaw Losvik <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Cocoa bindings one- or bi-directional
  • Next by Date: Re: NSNumber is completely broken
  • Previous by thread: Re: Cocoa bindings one- or bi-directional
  • Next by thread: Re: Cocoa bindings one- or bi-directional
  • Index(es):
    • Date
    • Thread