What is the best way to undo the writing to a file? If I'm going through a loop and writing one line at a time, and I want to undo the previous write and replace it with something else, how do I go about doing that? Any ideas?
Thanks in advance!
...
Hi all,
I managed to shoot myself in the foot this morning by doing the following:
Started working on a change to my project
Made a bunch of edits to a bunch of files
Realized that my approach was all wrong, and that I needed to start over
cd'd to the top level of my project and did a "svn --recursive revert ." to restore my local san...
I've got an attributed string bound to a NSTextView. I'm using a method that is called (using KVO) every time the string is edited to add background color attributes to string based on a regEx match. I do this by creating a new mutable attributed string with -initWithAttributedString: then -beginEditing, -addAttribute:, -endEditing. Once...
In vim, I did to much undo.
How do I undo this (i.e. redo)
...
I got the 'resolve' dialog in TFS, and it looks like I clicked too fast on the wrong button (because they're too close together) and blew away a week's worth of work when TFS discarded my local changes. Is there an undo operation somewhere?
...
I'm learning about undo, and I'd like a way to peek into the undo objects (NSInvocations) in the undoManager so I can see what's going on. I couldn't see anything like this in the docs, but maybe someone knows a way.
Thanks.
...
- (void)cancel {
// [managedObjectContext.undoManager disableUndoRegistration];
[managedObjectContext deleteObject:object]; // I don't want this deletion to be recorded on the undo stack which is empty at this point.
// [managedObjectContext.undoManager enableUndoRegistration];
[managedObjectContext.undoManager removeAllAct...
I've been tinkering with Cocoa for a few months now, and am trying to add undo/redo support to a strictly-for-learning-purposes Cocoa app I'm writing that lets you adjust iTunes track metadata. Thanks to NSUndoManager's prepareWithInvocationTarget: method, I have the basics in place — you can undo/redo changes to the Play Counts and Last...
If you delete a directory from a SVN working copy, but haven't commited yet, it's not obvious how to get it back. Google even suggests "svn undo delete before commit" as a common query when you type "svn undo d", but the search results are unhelpful.
edit: I'd like a solution that works in subversion 1.4.4
...
I know that I am missing something simple here. I have got this homework all done except for moving through my ArrayList. This is a undo feature of a calculator that I need to pull and remove a object from an ArrayList. Here is the method:
public void actionPerformed(ActionEvent e)
{
Status state;
state = new Sta...
Hi,
There's something really annoying in Visual Studio : where I expand or collapse a method or code region, this action is pushed on the undo stack. So if I edit some code in a method, then collapse that method, and then want to undo my change, I have to undo twice : once for the collapse action, and once for the change in code. This c...
I implemented an eclipse quick fix to change a block of code.
I'm using something like this to save my changes:
TextEdit edits = rewrite.rewriteAST();
UndoEdit undo = edits.apply(document);
But when i undo my changes (CTRL+Z), i have to step through all the TextEdit actions one by one.
Is there a way to group them so the quick fix ...
I just did an svn merge to merge changes from the trunk to a branch:
$ svn merge -r328:HEAD file:///home/user/svn/repos/proj/trunk .
--- Merging r388 through r500 into '.':
A foo
A bar
C baz1
C baz2
U duh
[...]
But there were too many conflicts, so I'd like to undo that.
One way to do that is to commit and then merge ...
I have an app that uses cgcontext to draw things onto a UIImageView that the user draws using touch events, and I want to be able to undo the drawings made by the user.
Edit:
I am trying to use my touchesBegan to save theUIImage at the begining of a touch to the NSUndoManager
And then how do I use it to undo using a UIAlertView.
Mea...
Is there any generally accepted, proven-to-work way using hibernate, that keeps a history of an entitys changes in the database?
We need to keep track of quite some objects and we want to be able to undo changes to objects.
I tried using the interceptors of hibernate, but the old state of the object is only available when doing merge()...
I'd like to use NSUndoManager in an iPhone application on CoreData (NSManagedObject) objects such that I can save (and later restore) the state of the NSUndoManager if the application exits prematurely (say, due to a phone call coming in). I.e. as opposed to automatically discarding or saving the changes accumulated in the NSUndoManager...
hello
first of all .. sorry if my english was bad. its my 3rd language
im working on a paint software that draw over images and save them again ( for commenting propose ) i use pile and wxpython.
but im still having problems with some features ..
what is the ideal way to make the undo option ?
another question .. when the user scal...
hi there,
I need to write these 3 functions, but i got stuck at redo and delete. Redo is showing error when there is nothing to redo and i don't know how to write delete function. Thank you
undo
public class Undo extends AbstractAction {
private MyCanvas myCanvas;
public Undo(MyCanvas myCanvas) {
this.myCanvas = myCanvas;
thi...
I refer to Phil Haack's "Undoable" article found here: http://haacked.com/archive/2010/01/01/jquery-undoable-plugin.aspx
I've copied the exact mark-up for the table from the tables demo page, included JQuery 1.3.2 min, and copied the exact script block used on the demo page but when it gets to this bit:
$('a.delete').undoable({
inline...
Is there a way we can undo a SQL update query?
...