Re: Pointer on a document (suite)
Re: Pointer on a document (suite)
- Subject: Re: Pointer on a document (suite)
- From: mmalc crawford <email@hidden>
- Date: Sat, 19 Jan 2008 13:51:26 -0800
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden