Hi, I create a WebView, load the html code and add it to an NSView. It
works. Now I would like to do something better. I paste the html code within
my NSTextView, then in the textView's drawRect method, when the textView is
the first responder, I display the text, as usual. When the textView is not
the first responder, I would like to display the content of the webView.
I did this way, but it doesn't work.

// from my NSTextView subclass
- (void)drawRect:(NSRect)rect
{
    if(mInEditing == NO){
         [mWebView drawRect:rect];
    }
    else{
         [super drawRect:rect];
    }
}

If I replace mWebView with a regular NSView, this code works.
I can clearly see the content of that NSView. But it doesn't work with the
WebView. What do I miss there?


Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to