• 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: Subclassing breaks bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing breaks bindings?


  • Subject: Re: Subclassing breaks bindings?
  • From: Dalzhim Dalzhim <email@hidden>
  • Date: Wed, 13 May 2009 12:22:28 -0400

Thanks Alexander, you made me realize my NSCell subclass was already
instantiated as a NSPopUpButtonCell when I dragged the NSPopUpButton into my
nib in Interface Builder. I have changed the NSCell subclass for my own and
now I can get both the binding and the custom appearance to work in my
simplified test.

Although I have stumbled upon a new problem. When supplying a NSMenu in
which the NSMenuItem all have Actions and Targets, the binding doesn't get
triggered! Is that really how it is supposed to be?

Thanks


-Dalzhim



2009/5/13 Alexander Spohr <email@hidden>

> Oh sorry, I missed your cellClass problem in my first post :(
>
> Am 13.05.2009 um 17:56 schrieb Alexander Spohr:
>
>  If I try to add a NSPopUpButton to my nib instead of a custom view, and
>>> set
>>> it's class to MySubclass, then the bindings work fine, but my override on
>>> +
>>> (Class) cellClass doesn't seem to work.
>>>
>>> Can anyone help me figure out what I might be doing wrong?
>>>
>>
> If cellClass is used in initWithFrame: only you might override
> initWithCoder: and set the cell(s class) there.
>
>        atze
>
>
_______________________________________________

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: 
 >Subclassing breaks bindings? (From: Dalzhim Dalzhim <email@hidden>)
 >Re: Subclassing breaks bindings? (From: Alexander Spohr <email@hidden>)
 >Re: Subclassing breaks bindings? (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: Centering a window ... not in the usual way!
  • Next by Date: Re: How to limit the file type when dragging?
  • Previous by thread: Re: Subclassing breaks bindings?
  • Next by thread: singletons and autoreleased objects
  • Index(es):
    • Date
    • Thread