• 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: Is there an easier way of changing NSButtonCell state in an NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView


  • Subject: Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 24 Nov 2011 09:47:14 -0800

On Nov 24, 2011, at 05:46 , Gilles Celli wrote:

> My hierearchical list will not changed or sorted in the NSoutlineView….that's why I was thinking to use NSArray for the buttons.

In your scenario -- where the list is "really" flat but displayed hierarchically for esthetic reasons -- the array approach is fine.

> However if I want to do it correctly, should I add an ivar like BOOL isChecked to my OvItem class ? So I won't need an NSArray
>
> Like this:
>
> @interface OvItem : NSObject {
>
> 	NSString *name;
> 	NSMutableArray *children;
> 	BOOL isGroup;
> 	BOOL isChecked; 		//  For NSButtonCell in the NSOutlineView
> }
>
> Do you think this is a better idea than using NSArray ?

If you're *already* using these OvItem objects, then I'd say it's worth doing this. It makes things a bit clearer when you (or someone else) return to the code in the future. It would probably also allow you to simplify your 'outlineView:objectValueForTableColumn:byItem:' method a bit.


_______________________________________________

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

  • Follow-Ups:
    • Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
      • From: Gilles Celli <email@hidden>
References: 
 >Is there an easier way of changing NSButtonCell state in an NSOutlineView (From: Gilles Celli <email@hidden>)
 >Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView (From: Quincey Morris <email@hidden>)
 >Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView (From: Gilles Celli <email@hidden>)
 >Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView (From: Quincey Morris <email@hidden>)
 >Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView (From: Gilles Celli <email@hidden>)

  • Prev by Date: Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
  • Next by Date: NSNumberFormatter Strangeness
  • Previous by thread: Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
  • Next by thread: Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView
  • Index(es):
    • Date
    • Thread