• 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 NSOutlineView - Almost resolved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSOutlineView - Almost resolved


  • Subject: Re: Custom NSOutlineView - Almost resolved
  • From: Todd Thomas <email@hidden>
  • Date: Mon, 21 Nov 2005 13:53:08 -0700


Does your custom cell subclass have any instance variables?
If it does then you'll need to extend the copyWithZone: method and retain or copy your added ivars.
That has bitten me a number of times..


Example:


@interface BLEntryCell : NSTextFieldCell { BLTitleCell* _titleCell; BLExcerptTextCell* _excerptTextCell; BLPostDateCell* _postDateCell; }

@end

- (id) copyWithZone:(NSZone*)zone
{
    BLBlogEntryCell* copy = [super copyWithZone:zone];
    [copy->_titleCell retain];
    [copy->_excerptTextCell retain];
    [copy->_postDateCell retain];

    return copy;
}

todd

http://tsquaredsoftware.com



On 21-Nov-05, at 2:34 AM, email@hidden wrote:

Hi ,
I've almost finished my custom outlineview.
Result look very nice.
The highlight is made with gradient, the field auto-grow/decrease.

I'll publish my code as soon as I have resolved one last point :
LineBreakMode.

In Tiger, everything is ok. But I want my Custom Outline to work on Panther.

So I've tried to implement the code you send to me but there is a problem in
the DrawInFrame method of my custom cell.


When I try to make a "setAttributedStringValue" with the new attributed
string with the BreakLineMode I want, I got an error message at runtime :
2005-11-20 21:52:12.703 Custom[1555] *** -[NSConcreteAttributedString
isEqualToString:]: selector not recognized [self = 0x3a26a0]
2005-11-20 21:52:12.704 Custom[1555] *** -[NSConcreteAttributedString
isEqualToString:]: selector not recognized [self = 0x3a26a0]


I don't know what it means ?!
I've got a custom subclasse of NSTextAndFieldCell (near ImageAndTextCell
from AppleSample).
Why can't I set a new AttributedStringValue ?
Thanks,


Guillaume


_______________________________________________ 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

_______________________________________________ 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: 
 >Custom NSOutlineView - Almost resolved (From: email@hidden)

  • Prev by Date: Re: adding Foundation framework to a Carbon application
  • Next by Date: Multithreading and NSNotifications
  • Previous by thread: Re: Custom NSOutlineView - Almost resolved
  • Next by thread: Explicit path for framework
  • Index(es):
    • Date
    • Thread