Re: scrollRangeToVisible from within mouseDown causing crash?

2008-04-03 Thread Martin Wierschin
Hi Ben, 1) I had a bug in my selection constraining code that in a few odd places subtract a larger number from a smaller number when creating a range, thus creating a range with a really really big length-- close to UINT_MAX. ... Anyway, I would have never run up against this if my code wa

Re: scrollRangeToVisible from within mouseDown causing crash?

2008-04-02 Thread Ben Lachman
To reply to my own post. The problem lay in two things: 1) I had a bug in my selection constraining code that in a few odd places subtract a larger number from a smaller number when creating a range, thus creating a range with a really really big length--close to UINT_MAX. When you then t

scrollRangeToVisible from within mouseDown causing crash?

2008-03-30 Thread Ben Lachman
I just added a call to scrollRangeToVisible: that is sometimes called from my text view's mouseDown method. Now, whenever scrollRangeToVisible: is called on a range that is not visible, the next drawRect of the text view crashes with the exception: "*** NSLayoutManager, _getGlyphBuffer():