Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Weird undo problem

Weird undo problem
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
May 14, 2004, 12:45 PM
 
Hey guys,

I have a text view app, and undo doesn't seem to want to work right.

I have no custom code on this, but if I undo once, its fine, but if I do undo twice in a row, I get this message:

2004-05-14 18:42:52.983 [968] *** -[NSBigMutableString _newSubstringWithRange:zone:]: Range or index out of bounds

2004-05-14 18:43:03.912 [968] undo: NSUndoManager 0x4b7ee30 is in invalid state, undo was called with too many nested undo groups

If I try and undo again after I get this message, I get the same:

2004-05-14 18:43:03.912 [968] undo: NSUndoManager 0x4b7ee30 is in invalid state, undo was called with too many nested undo groups

I really have no clue why this is happening since I have no code custom undo code.

Any ideas?

Thanks,
Oliver
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 14, 2004, 02:41 PM
 
Can you explain the situation in a bit more detail? Surely this doesn't happen any time you try to undo in any app, so what are the factors in this particular case?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
May 14, 2004, 02:54 PM
 
Originally posted by Chuckit:
Can you explain the situation in a bit more detail? Surely this doesn't happen any time you try to undo in any app, so what are the factors in this particular case?
Oh sorry, this only happens in my one app. A HTML editor, this didn't always happen but I can't pinpoint what I added that stopped undo from working. I really have no idea why this is happening. I do have a subclass of NSTextView, but I don't think anything in there can cause this.

Thanks,
Oliver
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 14, 2004, 05:08 PM
 
Given the information you've presented, my strongest hunch is that you've overridden an NSTextView method that normally closes an undo group and you didn't call super, so the behind-the-scenes undo handling is out of synch.

That's more or less a shot in the dark, though.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2