Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inspecting undo



--- On Thu, 7/31/08, James Maxwell <email@hidden> wrote:

> From: James Maxwell <email@hidden>
> Subject: inspecting undo
> To: "Cocoa Dev" <email@hidden>
> Date: Thursday, July 31, 2008, 9:52 AM
> I'm trying to figure out why a particular undo isn't
> working and I'm  
> wondering whether there's any way of viewing the method
> and object  
> registered with the most recent undo. I think I know why my
> undo isn't  
> working, in this particular case, but I'd like to see
> exactly what the  
> undoManager thinks it has at the top of its stack.
> 
> AFAIK there's no way to print the whole undo stack, but
> can I just see  
> the top?

If it's just for debugging purposes, you could cheat and look at the _undoStack ivar. Of course, this is an evil hack and should never, ever be used in production code, but it could be instructive just as an experiment.

Cheers,
Chuck


      
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >inspecting undo (From: James Maxwell <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.