I have the following method to open documents.
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
{
NSString *stringData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
[editorView setString:stringData];
if ( outError != NULL ) {
*outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
}
return YES;
}
It seems though that the document and its views are not loaded until YES
is returned so I cant set the content of the text view because its not yet loaded. Does any one know of a work around for this?
Thanks in advance