Re: WebView drawRect

2014-03-21 Thread Leonardo
: WebView drawRect On Mar 19, 2014, at 12:34 PM, Leonardo mac.iphone@gmail.com wrote: [mWebView drawRect:rect]; It¹s _never_ correct to call another view¹s drawRect method. (Or to call -drawRect directly at all, really. Except for a Œsuper¹ call inside your own -drawRect.) When I

Re: WebView drawRect

2014-03-21 Thread Jens Alfke
On Mar 21, 2014, at 9:01 AM, Leonardo mac.iphone@gmail.com wrote: Anyway, how can I flip horizontally the webView? Assign it a CALayer, and apply a transform to the layer. It’ll even do the animation for you. —Jens smime.p7s Description: S/MIME cryptographic signature

Re: WebView drawRect

2014-03-21 Thread Mike Abdullah
On 21 Mar 2014, at 18:50, Jens Alfke j...@mooseyard.com wrote: On Mar 21, 2014, at 9:01 AM, Leonardo mac.iphone@gmail.com wrote: Anyway, how can I flip horizontally the webView? Assign it a CALayer, and apply a transform to the layer. It’ll even do the animation for you. WebViews

Re: WebView drawRect

2014-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2014, at 11:50 AM, Jens Alfke wrote: On Mar 21, 2014, at 9:01 AM, Leonardo mac.iphone@gmail.com wrote: Anyway, how can I flip horizontally the webView? Assign it a CALayer, and apply a transform to the layer. It’ll even do the animation for you. Unless WebView has

Re: WebView drawRect

2014-03-21 Thread Jens Alfke
On Mar 21, 2014, at 12:14 PM, Kyle Sluder k...@ksluder.com wrote: Unless WebView has some special dispensation that I don't know about, assigning layers to views and mutating a view's layer are not supported operations. OK, then nest the WebView in a custom NSView and transform that view’s

Re: WebView drawRect

2014-03-21 Thread Leonardo
. Thank you all. I'm very glad. Regards -- Leonardo Da: Jens Alfke j...@mooseyard.com Data: Fri, 21 Mar 2014 12:19:18 -0700 A: Kyle Sluder k...@ksluder.com Cc: Leonardo mac.iphone@gmail.com, cocoa-dev@lists.apple.com Oggetto: Re: WebView drawRect On Mar 21, 2014, at 12:14 PM, Kyle Sluder k

WebView drawRect

2014-03-19 Thread Leonardo
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

Re: WebView drawRect

2014-03-19 Thread David Duncan
On Mar 19, 2014, at 12:34 PM, Leonardo mac.iphone@gmail.com wrote: 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

Re: WebView drawRect

2014-03-19 Thread Jens Alfke
On Mar 19, 2014, at 12:34 PM, Leonardo mac.iphone@gmail.com wrote: [mWebView drawRect:rect]; It’s _never_ correct to call another view’s drawRect method. (Or to call -drawRect directly at all, really. Except for a ‘super’ call inside your own -drawRect.) When I want to swap out