window does not redraw
window does not redraw
- Subject: window does not redraw
- From: Eric Blom <email@hidden>
- Date: Sun, 12 Jan 2003 19:20:49 -0800
I'm writing my first MacOS X programing and am having trouble getting a
window I create programatically (not via a menu operation) to redraw
properly. The window consists mainly of a table view. What happens is
the window comes up with it's default size with the correct contents.
However, if the window is resized to be larger the new portions of the
table are not drawn on the screen.
When I used the same document class via the Open... menu command
everything works just fine. Do I need to register the new
window/document with some controller? Any tips would be greatly
appreciated.
Cheers,
Eric
Byte readBuffer[16450];
id newDocument;
NSData *newDocumentData;
newDocument = [[NSDocumentController sharedDocumentController]
openUntitledDocumentOfType:@"Intel Hex File" display:YES];
[[NSDocumentController sharedDocumentController]
addDocument:newDocument];
if(nil == newDocument)
{
[self display:@"Could not create new hex document\n"];
}
newDocumentData = [NSData dataWithBytes:readBuffer length:16384];
[newDocument loadDataRepresentation:newDocumentData ofType:@"Rom File"];
[newDocument windowNibName];
[newDocument windowControllerDidLoadNib:[NSDocumentController
sharedDocumentController]];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.