Questions tagged [redo]
121 questions
7
votes
2 answers
What is the purpose of redo and retry statements in Ruby?
The only use case I can think of for redo would be for operations like writing to a socket or reading from a database, but if these fail once, subsequent attempts will most likely also fail so it still seems a bit pointless to me and as for retry I…

Llamageddon
- 3,306
- 4
- 25
- 44
6
votes
2 answers
Undo and redo in Canvas for Android
I am using a customized version of FingerPaint for Android with some other features, like inserting images and moving them. I decided to implement an Undo&Redo, since it will make life just easier. In order to implement it, I finally decided to use…

kikoso
- 673
- 1
- 6
- 17
6
votes
3 answers
C#: Unable to undo inserted text
I am programatically adding text in a custom RichTextBox using a KeyPress event:
SelectedText = e.KeyChar.ToString();
The problem is that inserting text in such a way doesn't trigger the CanUndo flag.
As such, when I try to Undo / Redo text (by…

Hussein Khalil
- 1,585
- 2
- 25
- 47
5
votes
1 answer
Ruby's redo method vs while loop
I was reading this question and it got me thinking why one would want to use a while loop when the redo method could be used instead. I can't find any differentiation between the two. I know that the redo method will rerun the block of code, and…

chell
- 117
- 8
4
votes
2 answers
Can I jump back to the beginning of a method using 'redo' in Ruby?
In the Poignant Guide this example of the redo keyword is given:
class LotteryTicket
def self.new_random
new(rand(25) + 1, rand(25) + 1, rand(25) + 1)
rescue ArgumentError
redo
end
end
It's supposed to keep calling new until all three…

Paige Ruten
- 172,675
- 36
- 177
- 197
4
votes
2 answers
Implementing undo and redo in a UITextView with attributedText
I'm trying to add undo and redo functionality to my implementation of a UITextView. I am using attributedText and not simply the text property of the UITextView. I've tried using the function calls in undoManager as cited in the Apple documentation,…

Anters Bear
- 1,816
- 1
- 15
- 41
4
votes
3 answers
Undo/redo with a UITextView (iOS/iPHone)
I have a view where a UITextView always has focus. What I want to do is extend the built-in undo/redo behavior to support undo/redo for when I programmatically set the text (e.g., for when I clear it, by setting it to @"").
Since only the…

Aral Balkan
- 5,981
- 3
- 21
- 24
4
votes
2 answers
What is the difference between redo log and doublewirte buffer in MySql InnoDB?
Before, I thought redo log was used to recovery the database when crash happened.
But I felt I was wrong when I saw the note as follows:
crash recovery
The cleanup activities that occur when MySQL is started again after a crash. For InnoDB tables,…

user7030612
- 43
- 3
4
votes
2 answers
How do I restore a NSUndoManager's contents in a CoreData NSManagedObjectContext?
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…

David Carney
- 2,200
- 1
- 19
- 28
4
votes
3 answers
How to implement redo statement (as in Perl and Ruby) in Lisp
Code that requires break statements or continue statements in other languages can be done with block & return-from or catch & throw in Common Lisp and Emacs Lisp. Then there is code that requires redo statements, or at least best written with redo.…

Jisang Yoo
- 3,670
- 20
- 31
3
votes
2 answers
Undo and Redo Action events in Java
I have an application with a JPanel and buttons that users click on to draw shapes on the panel. You can color and resize the shapes as well as move them around in the panel. How would I go about implementing undo and redo for such an application? I…

glenn
- 31
- 1
- 4
3
votes
1 answer
How to #rewind the internal position under #each?
I'm trying to write a code where the enumeration sequence is rewinded to the beginning.
I think rewind is appropriate for this application, but I'm not sure how to implement it under an each iterator passing to a block? In the Ruby-Docs example,…
user3105189
3
votes
2 answers
Cleanest Perl parser for Makefile-like continuation lines
A perl script I'm writing needs to parse a file that has continuation lines like a Makefile. i.e. lines that begin with whitespace are part of the previous line.
I wrote the code below but don't feel like it is very clean or perl-ish (heck, it…

TomOnTime
- 4,175
- 4
- 36
- 39
2
votes
2 answers
How to get RichTextBox Undo to work better?
I am trying to write a text editor using RichTextBox. My concern is now about Undo and possibly Redo features of RichTextBox.
When I start writing in text box, say 1 minute! if I call Undo method, all it does is just I beleive clearing or resetting…

Dumbo
- 13,555
- 54
- 184
- 288
2
votes
2 answers
Drawing Layers over ImageView in Android
Can anyone guide me how can I put different drawing layers on an Image which is shown over ImageView component.
Basically I want to implement Undo and Redo Functionality in my drawing application.
Currently I can put text or Drawing over image but…

Awais Tariq
- 7,724
- 5
- 31
- 54