FROM : Corbin Dunn
DATE : Wed Nov 07 00:09:21 2007
>
>
> On Leopard, the method also doesn't get called, but I do get a
> tooltip for my root item (the first column of the browser has only
> one item), with text that seems to be taken from the text of my
> (custom) NSBrowerCell. None of the other items (incorrectly) show
> tooltips at all.
>
That's the expansion tool tip. It is documented, and mentioned in the
release notes:
http://developer.apple.com/releasenotes/Cocoa/AppKit.html
> NSCell Automatic Expansion ToolTip FrameNSCell has some new API to
> support expansion tool tips in certain controls:
> - (NSRect)expansionFrameWithFrame:(NSRect)cellFrame inView:(NSView
> *)view;
> - (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView
> *)view;
> An expansion tool tip allows one to see truncated text in a special
> floating window that is similar but different from a normal ToolTip.
> Currently, NSTableView, NSOutlineView and NSBrowser display
> expansion tool tips when the text is truncated. If you have a cell
> that will be displayed in one of these controls, it is recommended
> that you implement the above methods to properly support the
> expansion tool tip feature. By default, the methods are properly
> implemented in NSTextFieldCell and NSBrowserCell. NSCell will always
> return NSZeroRect, and prevent the expansion from happening. For an
> example of how to implement it, see the SimpleBrowser demo app.
>
> Clients of NSTableView, NSOutlineView and NSBrowser can prevent the
> cell expansion from happening on a particular row/column by using
> the new delegate methods declared in the appropriate header files.
>
>
> However, after this tooltip has been displayed, the underlying
> NSBrowserCell seems to have been released by something, judging by
> the crashes I get next time it's accessed.
This is because you aren't properly implementing copyWithZone; in it,
you should retain or copy your ivars.
corbin
DATE : Wed Nov 07 00:09:21 2007
>
>
> On Leopard, the method also doesn't get called, but I do get a
> tooltip for my root item (the first column of the browser has only
> one item), with text that seems to be taken from the text of my
> (custom) NSBrowerCell. None of the other items (incorrectly) show
> tooltips at all.
>
That's the expansion tool tip. It is documented, and mentioned in the
release notes:
http://developer.apple.com/releasenotes/Cocoa/AppKit.html
> NSCell Automatic Expansion ToolTip FrameNSCell has some new API to
> support expansion tool tips in certain controls:
> - (NSRect)expansionFrameWithFrame:(NSRect)cellFrame inView:(NSView
> *)view;
> - (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView
> *)view;
> An expansion tool tip allows one to see truncated text in a special
> floating window that is similar but different from a normal ToolTip.
> Currently, NSTableView, NSOutlineView and NSBrowser display
> expansion tool tips when the text is truncated. If you have a cell
> that will be displayed in one of these controls, it is recommended
> that you implement the above methods to properly support the
> expansion tool tip feature. By default, the methods are properly
> implemented in NSTextFieldCell and NSBrowserCell. NSCell will always
> return NSZeroRect, and prevent the expansion from happening. For an
> example of how to implement it, see the SimpleBrowser demo app.
>
> Clients of NSTableView, NSOutlineView and NSBrowser can prevent the
> cell expansion from happening on a particular row/column by using
> the new delegate methods declared in the appropriate header files.
>
>
> However, after this tooltip has been displayed, the underlying
> NSBrowserCell seems to have been released by something, judging by
> the crashes I get next time it's accessed.
This is because you aren't properly implementing copyWithZone; in it,
you should retain or copy your ivars.
corbin
| Related mails | Author | Date |
|---|---|---|
| Martin Redington | Nov 6, 22:32 | |
| Corbin Dunn | Nov 7, 00:09 | |
| Martin Redington | Nov 7, 01:51 |






Cocoa mail archive

