• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bug in TextFinder.m (also in TextEdit)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in TextFinder.m (also in TextEdit)


  • Subject: Re: bug in TextFinder.m (also in TextEdit)
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 22 Aug 2001 12:31:14 -0700

On Wednesday, August 22, 2001, at 11:48 AM, Oliver Chern wrote:

I'm not quite sure if this is the right listserver to send to, but since
I've seen Ali Ozer post a couple times here and I'm sure a couple ppl have
used Textfinder.h and textfinder.m in their source code, I figured I should
point out this bug here.

when a user clicks replace, and then replace & next, he gets an unwanted
duplicate of the replace string.

Example:

asdf
asdf

Find: asdf
Replace With: zako

1. click "next" to find the search string "asdf".
2. click "replace" to replace "asdf" with "zako".
3. click "replace and find" with the same search strings.

u'll end up with:

zakozako
asdf

just thought u'd like to know.

The bug there isn't in the behaviour of the code, it's in the confusing title of the button. "Replace" inserts the replacement string in place of the current selection. After step 2, the selection is right after the string you inserted, and it has zero length. To get the behaviour you want, don't use the "replace" button, just use the "replace and find."

-jcr


[Objc retain];


  • Follow-Ups:
    • Re: bug in TextFinder.m (also in TextEdit)
      • From: "David P. Henderson" <email@hidden>
References: 
 >bug in TextFinder.m (also in TextEdit) (From: Oliver Chern <email@hidden>)

  • Prev by Date: FW: Enabling and Disabling menus
  • Next by Date: Re: Several sheets at the same time?
  • Previous by thread: bug in TextFinder.m (also in TextEdit)
  • Next by thread: Re: bug in TextFinder.m (also in TextEdit)
  • Index(es):
    • Date
    • Thread