Walkback in DSDN for D6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Walkback in DSDN for D6

Bernhard Kohlhaas-6
I am getting an occasional walkback "Index 1 is out of bounds" in DSDN6,
when I click on certain archive posts in the search tab.

It happens when the method DsdnSearchPresenter>>highlightNextTargetIn:
evaluates "aUrlOrTextPresenter selectionRange first" at the very end of
the method. In all cases the interval has a start of 1 and an end of 0.

My assumption is that this happens, when the search term is part of the
subject, but not in the body of a message.

Example: Use DSDN to search the archive for the term "MVP", then locate
the thread "programmatic MVP" (7/9/2005 - 7/10/2005). The first three
post are okay and the MVP in the text is highlighted, but the last post
from 7/10 8:58 causes the walkback (and does not have the term in the
msg body).

Another example would be the thread "Doubt with MVP" (7/10/2005 -
7.16.2005).

Best Regards,
Bernhard


Reply | Threaded
Open this post in threaded view
|

Re: Walkback in DSDN for D6

Ian Bartholomew-21
Bernhard,

> I am getting an occasional walkback "Index 1 is out of bounds" in DSDN6,
> when I click on certain archive posts in the search tab.

Thanks for that.  I'd forgotten than the the search checked the
documents subject field as well.  The fix is to replace the method as below

DsdnSearchPresenter>>highlightNextTargetIn: aUrlOrTextPresenter
   self canLocate ifFalse: [^self].
   aUrlOrTextPresenter view findNextWrapped: ((FindDetails new)
     pattern: DsdnSearch current searchFor;
     isForwards: true;
     isWholeWord: DsdnSearch current wholeWord;
     isCaseSensitive: DsdnSearch current ignoreCase not;
     isWrapAround: true;
     yourself).
   aUrlOrTextPresenter selectionRange isEmpty ifTrue: [^self].
   aUrlOrTextPresenter view
     lineScroll: (aUrlOrTextPresenter view lineFromPosition:
aUrlOrTextPresenter selectionRange first)

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Walkback in DSDN for D6

Bernhard Kohlhaas-7
Ian,

Thanks so much, that solves the problem.

Best Regards,
Bernhard


Ian Bartholomew wrote:
>
> Thanks for that.  I'd forgotten than the the search checked the
> documents subject field as well.  The fix is to replace the method as below

[...]