• 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: NSButtonCell subclass that ignores events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtonCell subclass that ignores events


  • Subject: Re: NSButtonCell subclass that ignores events
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 6 Oct 2005 15:50:23 -0500


On Oct 5, 2005, at 8:01 PM, Andy Armstrong wrote:

On 6 Oct 2005, at 01:54, Ricky Sharp wrote:

What "behaviors" do you want? To me, behaviors imply how the control works with input devices. Are you talking about the appearance of your indicator? If so, why would you want it to look like a button?


If I implement the indicator as a subclass of NSControlCell and want my control to work in Interface Builder I have to provide code to handle serialising the control's state and I have to implement accessors for that state. If I subclass NSButtonCell all I have to do is stop it from being pressed. While I'm quite happy to implement my control as a NSControlCell subclass - and have in fact done so - I believe it would be more elegant to subclass NSButtonCell.


Judging by the way everyone's counselling against it I'm getting the sense that that's contrary to the wisdom of the list. How so? I'm not being argumentative - just wondering.

This is still confusing. Are you wanting to subclass NSButtonCell just for the sake of having a 'state' attribute? And, are those states all valid for what you need?


And you still haven't answered what the appearance of your indicator will be. If it ends up looking like a button, users will want to click it.

I'd still go with a subclass of NSCell and add your own uniquely named state attribute with values that make sense for your needs.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
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: NSButtonCell subclass that ignores events
      • From: "John C. Randolph" <email@hidden>
References: 
 >NSButtonCell subclass that ignores events (From: Andy Armstrong <email@hidden>)
 >Re: NSButtonCell subclass that ignores events (From: Ricky Sharp <email@hidden>)
 >Re: NSButtonCell subclass that ignores events (From: Andy Armstrong <email@hidden>)
 >Re: NSButtonCell subclass that ignores events (From: Ricky Sharp <email@hidden>)
 >Re: NSButtonCell subclass that ignores events (From: Andy Armstrong <email@hidden>)

  • Prev by Date: Re: Flipping an NSImage (even more trouble with size)
  • Next by Date: Tracking mouse
  • Previous by thread: Re: NSButtonCell subclass that ignores events
  • Next by thread: Re: NSButtonCell subclass that ignores events
  • Index(es):
    • Date
    • Thread