nsundomanager Questions
8
Solved
How do I use UndoManager (previously NSUndoManager) in Swift?
Here's an Objective-C example I've tried to replicate:
[[undoManager prepareWithInvocationTarget:self] myArgumentlessMethod];
Swift...
Limeade asked 20/6, 2014 at 12:11
4
Solved
I want to be able to replace some text in an UITextView programatically, so I wrote this method as an UITextView category:
- (void) replaceCharactersInRange:(NSRange)range withString:(NSString *)n...
Perkins asked 21/6, 2011 at 2:49
1
I am having trouble understanding how NSUndoManager captures values when the values are reference types. Whenever try to use the undoManager, the values don't undo.
Note: I need to support macOS ...
Brunhilde asked 10/1, 2017 at 18:19
5
Solved
I've implemented undo/redo the standard way (NSUndoManager) but can't figure out how I disable undo/redos when my app is in a specific state.
Users draw things in my app and when what they've dra...
Krause asked 25/2, 2013 at 18:37
3
Solved
I am migrating an Xcode 7 / Swift 2.2 mac OS X project to Xcode 8 / Swift 3, and I have run into a problem using undoManager in my view controller class, MyViewController, which has a function undo...
Changchangaris asked 18/9, 2016 at 21:1
4
Solved
I want to perform undo operations on the graphics context in my drawing app. When undo is pressed i want to move to the previous context that contains the old drawing.
For Example:
I have a recta...
Sangfroid asked 1/2, 2013 at 10:55
1
My app crashes when I try to do undo on UISearchBar. In my app I have code to prevent entering a '%' sign on the search bar and for doing this it replaces a % to @"" in textDidChange method as belo...
Gonion asked 3/4, 2014 at 17:51
1
Solved
I am developing an app which has rich text editor feature. On top of ZSSRichTextEditor I have written my editor code. Here my editor is UIWebView which will be injected by javascript code to suppor...
Uriia asked 28/5, 2015 at 6:40
5
Solved
I have a breakpoint set and want to print my UITextField's superview. I type po myTextField.superview but I receive the following error:
error: instance method 'undoManager' has incompatible resul...
Yammer asked 9/6, 2014 at 17:27
3
I'm creating a UITextView:
greetingTextView = [[UITextView alloc] initWithFrame:greetingRect];
Using it fine, but when the ViewController it is attached to deallocs I'm getting memory leaks ONLY...
Edita asked 31/10, 2013 at 12:14
2
Solved
I have a NSTableView populated by a Core Data entity and Add Item / Remove Item buttons all wired with a NSArrayController and bindings in Interface Builder.
The Undo/Redo menu items can undo or r...
Swinge asked 15/5, 2014 at 20:6
2
Solved
I am writing a special-purpose text editor in cocoa that does things like automatic text substitution, inline text completions (ala Xcode), etc.
I need to be able to programmatically manipulate th...
Odum asked 7/4, 2011 at 18:42
2
I'm trying to run an example using EnableGUI function.
% ghci -framework Carbon Main.hs
*Main> enableGUI >> main
This is what I get instead of a working program:
2013-01-14 00:21:03.0...
Inalterable asked 13/1, 2013 at 20:26
1
Solved
I've recently noticed this strange thing about undo mechanism in Core Data and it's bothering me ever since.
A quote from NSManagedObjectContext documentation for -undo method:
Sends an undo me...
Diarmit asked 13/2, 2013 at 2:41
3
I'm working on a core data application that has a rather large hierarchy of managed objects similar to a tree.
When a base object is created, it creates a few child objects which in turn create th...
Celestyn asked 28/12, 2010 at 21:51
1
Solved
I am making a simple application that uses a NSSlider, which can be put to it's max or min value with two buttons.The undo manager shall track all changes and allow to undo/redo all changes made us...
Knickers asked 2/7, 2012 at 0:13
1
Solved
There are two entities: Author and Book. Author has an attribute authorName and a to-many relationships books. Book has several attributes and a relationship author. There is a view controller (VCA...
Boresome asked 4/5, 2012 at 6:25
3
Solved
I am trying to create an iPhone application where the user can add entries. When he presses a new entry, a box will popup asking him for some information. Then he can either press "Cancel" or "Save...
Moitoso asked 20/2, 2010 at 21:57
1
Solved
I'm trying to implement an NSUndoManager in my iOS app. I got the undo functionality to work, but not the redo part. I'm quite new to iOS development and this is the first time that I've used NSUnd...
Antilepton asked 23/11, 2011 at 21:46
1
I want to add a undo manager to a coredata backed iphone application. When the user tries to add a new object (by tapping on + button) I load a new modal viewcontroller and start a new undo group i...
Bobbyebobbysocks asked 31/1, 2011 at 16:39
3
Solved
I'm learning Cocoa, and I've gotten undo to work without much trouble. But the setActionName: method is puzzling me. Here's a simple example: a toy app whose windows contain a single text label and...
Section asked 23/2, 2011 at 3:10
3
Solved
//Edit: Really, nobody has any suggestions or thoughts on this? Have I asked the question wrongly somehow?//
My iPhone app has a single managedObjectContext with a moderately complicated data mode...
Venegas asked 12/2, 2011 at 21:4
1
Solved
I'm looking for a built-in (or easy-to-implement) way to get Core Data undo/redo action names to read like "Undo edit First Name", rather than simply "Undo" or "Redo" as they do by default.
I have...
Lonna asked 17/4, 2011 at 20:43
1
Solved
I'm trying to integrate the undo/redo features in a UITextView (I'm building a LateX editor) with no luck and to be honest I'm really confused about this argument. I don't understand the steps invo...
Sitarski asked 22/2, 2011 at 14:38
4
Solved
I'm currently working with an NSPersistentDocument subclass that uses NSOperation to import data in the background. As per the documentation, I'm observing the NSManagedObjectContextDidSaveNotifica...
Platoon asked 7/2, 2011 at 19:36
1 Next >
© 2022 - 2024 — McMap. All rights reserved.