Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Crashing from undo/redo using "replaceSelectionWithText"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crashing from undo/redo using "replaceSelectionWithText"



Title: Re: Crashing from undo/redo using "replaceSelectionWithText"
That could very well be the problem. I thought I took care of that case, but setting breakpoints shows me that it’s still happening. I’ll give that a try, and if it still doesn’t work, I’ll file the bug.

Thanks much!
-Jing


On 2/12/08 5:48 PM, "Justin Garcia" <email@hidden> wrote:


On Feb 12, 2008, at 4:28 PM, Jing Chen (Volt) wrote:
Hi all,
 
 I’m having a problem with the undo/redo that is implemented in WebKit. When I do something that alters the selected text (like [WebView replaceSelectionWithText] or changing the font of the selected text) inside of the delegate method of NSComboBox,
comboBoxSelectionDidChange, the undo/redo behaves incorrectly. For example:
 
 
  1. Type “123”
  2. Select “2” and trigger the NSComboBox delegate notification, which is supposed to replace the selection with “foo”. The result is “1fooc”
  3. Undo. This gives “foo123”, should give “123”
  4. Redo. This gives “foo1foo3”, should give “1foo3”
  5. Undo twice. This gives “foo”, should give the empty string (original starting point).

Is it possible that comboBoxSelectionDidChange is being called during any of the editing operations that are performed on the text?  For example, perhaps it is called during the Undo operation, which might explain the extraneous "foo" that appears before "123".

Justin

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Crashing from undo/redo using "replaceSelectionWithText" (From: Justin Garcia <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.