• 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: Custom bindings in a control/cell pair
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom bindings in a control/cell pair


  • Subject: Re: Custom bindings in a control/cell pair
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 24 Feb 2005 09:11:02 -0600

On Thursday, February 24, 2005, at 07:30AM, Ricky Sharp <email@hidden> wrote:

>I'm now adding custom bindings to my more complicated palette items.  These are all control/cell pairs.
>
>I'm wondering if it's a good idea to put the implementation for bindings completely in the cell class and just have the control class 'call through'.  I don't see any problems in doing this.  For example, for unbind:, the control class would simply do this:
>
>- (void)unbind:(NSString*)aBindingName
>{
>    [[self cell] unbind:aBindingName];
>}

So far, this has been a bad idea.  It exposed the problem when you don't call in through super's implementation of bind (and unbind).  I should have known that!

Anyhow, to simplify things for now, I just duplicated the implementation in both the control and cell.   Later on I'll play around with potentially minimizing the redundancy.

But now I have more problems in that while I can bind my button's custom property, testing in IB fails (exception thrown):

2005-02-24 09:08:32.146 Interface Builder[1423] Simulator got exception *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value

Going to now trace this.  I hope that by the end of the day I can have a complete working example of a custom control/cell binding.  Will share that solution here.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
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

  • Follow-Ups:
    • Re: Custom bindings in a control/cell pair
      • From: Ricky Sharp <email@hidden>
References: 
 >Custom bindings in a control/cell pair (From: Ricky Sharp <email@hidden>)

  • Prev by Date: NSWindow doesnt update it's background on view resize
  • Next by Date: Re: NSWindow doesnt update it's background on view resize
  • Previous by thread: Re: Custom bindings in a control/cell pair
  • Next by thread: Re: Custom bindings in a control/cell pair
  • Index(es):
    • Date
    • Thread