NSTextView 内のポイントの画面位置 (NSPoint) を取得したいのですが、これは単純なはずですが、結果は常に少しずれており、X は完璧ですが、Y は変化しているようです。
以下のコードのいくつかのバリエーションを試しましたが、求めている結果が得られません。NSClipView がそれを台無しにしていますか?
NSPoint p = [[self layoutManager] locationForGlyphAtIndex:r.location];
//NSPoint b= [self convertPoint:p toView:nil];
NSPoint screenlocation = [self convertPointToBase:p];
何か案は?
乾杯!
MT