I'm attempting to make a simple html browser using the following:
a NSURLHandle to download the data
a NSTextView to display the HTML
To know when an image is loaded I register for
HTMLDocumentChangedNotification, and on the notification I wish to
refresh the NSTextView. To do this I am calling [myTextView
setNeedsDisplay:YES]; only this causes the following message in stdout
and no refresh:
2002-08-14 11:06:16.338 WeBrowser
drawWithOuterFrame:contentFrame:clipping: called on cell 0x1570b60 which
has not yet measured! thread Thread 0x800013b8
If I comment out the setNeedsDisplay line and resize the window after
the page first loads (manually) I get the webpage in it's full glory,
but this is obviously not the best solution...
Any idea what is causing the error?? Otherwise, any ideas how to refresh
the NSTextView effiecently?
(I've tried things like programmatically altering the window frame then
returning it to the original size (slow) and passing the html data back
to the NSTextView (even slower))
I'm having difficulty posting the code up on the internet so I've added
it to the end of the email...