• 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: email@hidden
  • Date: Tue, 22 Nov 2005 09:54:51 +0100

Hi,
Thanks for your help.
Actually, in my "DrawInFrame" method, to be compatible with Panther, I've
added some code that set AttributedString to my cell.
And in the "setObjectValue " method of the delegate (my outlineView is
editable), i compare the objet with empty string.
Before I add the "Panther" Code, "object" in delegate's "setObjectValue",
"object" alwas responds to isEqualToString. But now, object is sometimes
(when no end editing) a NSAttributedString.

So I've added a test to the class name to fix it and it's ok.
But I've still the problem with LineBreakMode...
I'll search deeply.
Thanks to all !
Guillaume

> -----Message d'origine-----
> De : Todd Thomas [mailto:email@hidden]
> Envoyé : lundi 21 novembre 2005 21:53
> À : GANDREAU,GUILLAUME
> Cc : email@hidden
> Objet : Re: Custom NSOutlineView - Almost resolved
>
>
>
> 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

  • Prev by Date: Re: app icons
  • Next by Date: Re: Automagic instantiation of singletons? (Christian Brunschen)
  • Previous by thread: [ANN] Lingon 1.0
  • Next by thread: Crashing when using debug suffix on frameworks
  • Index(es):
    • Date
    • Thread