mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:21:04 +00:00
* Source/NSTextView.m (-view:stringForToolTip:point:userData:):
Ensure this returns an NSString, even if NSToolTipAttributeName is set to something else (it calls -description on the value). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33597 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c1e194da9f
commit
d919131abb
2 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-07-20 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSTextView.m (-view:stringForToolTip:point:userData:):
|
||||
Ensure this returns an NSString, even if NSToolTipAttributeName
|
||||
is set to something else (it calls -description on the value).
|
||||
|
||||
2011-07-19 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/GSGhostscriptImageRep.m: Search for gs by enumerating directories
|
||||
|
|
|
@ -4023,6 +4023,7 @@ Figure out how the additional layout stuff is supposed to work.
|
|||
{
|
||||
NSPoint origin;
|
||||
NSUInteger startIndex;
|
||||
id value;
|
||||
|
||||
// Origin is in window coordinate space
|
||||
origin = rect->rectangle.origin;
|
||||
|
@ -4037,9 +4038,17 @@ Figure out how the additional layout stuff is supposed to work.
|
|||
startIndex = [self _characterIndexForPoint: point
|
||||
respectFraction: NO];
|
||||
// Look up what the tooltip text should be.
|
||||
return [_textStorage attribute: NSToolTipAttributeName
|
||||
atIndex: startIndex
|
||||
effectiveRange: NULL];
|
||||
value = [_textStorage attribute: NSToolTipAttributeName
|
||||
atIndex: startIndex
|
||||
effectiveRange: NULL];
|
||||
|
||||
// The value of NSToolTipAttributeName should be an NSString,
|
||||
// but we deal with it being something else too.
|
||||
if (![value isKindOfClass: [NSString class]])
|
||||
{
|
||||
value = [value description];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
END_FOR_IN(_tracking_rects)
|
||||
return nil;
|
||||
|
|
Loading…
Reference in a new issue