Skip navigation.
 
mlRe: Pointer on a document (suite)
FROM : mmalc crawford
DATE : Sat Jan 19 22:51:26 2008

On Jan 19, 2008, at 1:11 PM, Eric PETIT wrote:
> I am trying to achieve the following thing :
> In a class, I want to create a document and "write" NSString with 
> the "insertText" method.
> I create this document with : [NSApp 
> sendAction:@selector(newDocument:) to:nil from:self] but to use 
> "insertText" on it, I need to recover a pointer on the created 
> document.
> How can I recover the pointer on the document created with [NSApp 
> sendAction:@selector(newDocument:) to:nil from:self] ?
>

You don't.
Assuming you're using the document architecture, you create a new 
document instance using the shared NSDocumentController instance and, 
for example, openUntitledDocumentAndDisplay:error:.

mmalc

Related mailsAuthorDate
mlPointer on a document (suite) Eric PETIT Jan 19, 22:11
mlRe: Pointer on a document (suite) mmalc crawford Jan 19, 22:51