TextEdit>>findNextWrapped: returns interval but should return a boolean

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

TextEdit>>findNextWrapped: returns interval but should return a boolean

James Foster-3
Changing the last line seems to fix things:
    "^match"    "bad"
    ^match notEmpty    "good"

The comment also seems to be copied from something else since it refers to
'aString' which isn't passed in or used.

James Foster


Reply | Threaded
Open this post in threaded view
|

Re: TextEdit>>findNextWrapped: returns interval but should return a boolean

Ian Bartholomew-21
James,

> Changing the last line seems to fix things:
>     "^match"    "bad"
>     ^match notEmpty    "good"
>
> The comment also seems to be copied from something else since it refers to
> 'aString' which isn't passed in or used.

Looking at the way it's used in the image I would think the comment is
wrong and the code correct - it should answer an Interval (as
#find:range: does) rather than a Boolean.

That's the way I've used it anyway :-)

--
Ian

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