Re: changing name of untitled document

2011-01-01 Thread Quincey Morris
On Jan 1, 2011, at 21:13, Kurt Sutter wrote: > Our application supports two types of NSDocuments. One contains data, the > other drawings. Hence, we have defined two sibling classes of NSDocument: > DataDocument and DrawingDocument. > > When I create a new instance of DataDocument or DrawingDoc

Re: String variables in classes

2011-01-01 Thread Graham Cox
On 02/01/2011, at 8:00 AM, Brian Durocher wrote: > I have a quick question about member variables in a class. Is there a > way to use an NSMutableString in a class as a member? Yes, it requires no special considerations. > I would like to > make a string which accumulates equation text, in a

Re: String variables in classes

2011-01-01 Thread Stephen J. Butler
On Sat, Jan 1, 2011 at 3:00 PM, Brian Durocher wrote: > I have a quick question about member variables in a class. Is there a > way to use an NSMutableString in a class as a member? I would like to > make a string which accumulates equation text, in a calculator class. I > have tried a number of m

String variables in classes

2011-01-01 Thread Brian Durocher
I have a quick question about member variables in a class. Is there a way to use an NSMutableString in a class as a member? I would like to make a string which accumulates equation text, in a calculator class. I have tried a number of methods to get this working with no success. The output of the N

iPhone UISearchDisplayController how to handle memory warning

2011-01-01 Thread Donald Largen
Here is my situation. I have UIViewController, call it ViewControllerA, that contains an UITableView and UISearchDisplayController. ViewControllerA is the root view controller in a UINavigationController. Things seem to work OK, that is I can preform a search, display the results, and select

changing name of untitled document

2011-01-01 Thread Kurt Sutter
hi Our application supports two types of NSDocuments. One contains data, the other drawings. Hence, we have defined two sibling classes of NSDocument: DataDocument and DrawingDocument. When I create a new instance of DataDocument or DrawingDocument, its window is named "Untitled". However, I w

NSTableView with ArrayController bindings not updating?

2011-01-01 Thread Ben Golding
I feel like I must be doing something silly but I can't see it. I am writing a crossword setting application. I have a Crossword class which has two instance variables, grid and clues each of which is a custom class (Grid and Clues). My problem relates to the Clues class which has two instanc

Re: Memory management about async object

2011-01-01 Thread Steve Sisak
There's some good information on this in TechNote 2009 Also, here is some sample code you might find very helpful: as it does almost what you're descr

Re: Memory management about async object

2011-01-01 Thread Andreas Grosam
On Dec 29, 2010, at 5:54 PM, James Bucanek wrote: > - (void) loadData { >DataHandler *myHandler = [[DataHandler alloc] init]; >// set this view controller itself as a delegate, when the data loading > finished, myHandler will call its callback method >myHandler.delegate = self; >[

Re: Event to trigger writeSelectionToPasteboard

2011-01-01 Thread Peter Lübke
You can copy a selection using the Accessibility API: First get the UIElement for the application's "Copy" menu item. Then invoke "AXPress" on it. Drawback is that you will have to ask the user to enable Accessibility if it is not enabled. To get an idea about Accessibility, look at Apple's "A

Re: Event to trigger writeSelectionToPasteboard

2011-01-01 Thread Graham Cox
On 01/01/2011, at 6:43 AM, Peter Watkins wrote: > I know that each Cocoa app implements writeSelectionToPasteboard(), and I'm > guessing this is how services interact with running apps. Each service is a > separate short-running process. Sothere must be some sort of IPC to get the > selection fro

Custom view with NSTreeController

2011-01-01 Thread Bryan Hansen
I'm trying to create a custom view which is backed by an NSTreeController. I've seem many threads discussing this without any real specific resolution. I'm familiar with how to get an NSOutlineView to bind to an NSTreeController but getting a custom view to replace the outline view is a challeng

Event to trigger writeSelectionToPasteboard

2011-01-01 Thread Peter Watkins
I'm writing an app that lets the user select text in one program and paste it into another by middle-clicking the mouse button. This roughly emulates the X11 selection buffer. The first version I wrote used event taps to detect when the user dragged a selection (doesn't work for a double-click sel