drawRect is called twice ...
-
Ross Boucher
- State changed from new to hold
drawRect may be called multiple times. In fact, as anything in the UI changes that Cappuccino determines may affect the contents of whatever view you're drawRect method is defined, it will call it.
The idea of drawRect is that it should always draw exactly what your UI should look like. In other words, it's a replace solution, not an additive one. Beyond the obvious fact that you shouldn't be appending to the DOM yourself, you definitely should NOT be doing it inside drawRect. If anything, this is the method you'd want to actually paint onto the canvas with.
The other thing about drawRect is that you don't need to create your own canvas, its done automatically for you. I believe there may be a bug with this currently that Francisco is working on a fix for.
-
Francisco Tolmasky
- State changed from hold to resolved
(from [5618b628cf50f00959d3538d5dc7935723a2bb1c]) Modernized CPView drawing.
Fix for http://cappuccino.lighthouseapp..... Fix for http://cappuccino.lighthouseapp....>
[#31 Make CPView use run loop drawing state:resolved] [#28 drawRect is called twice ... state:resolved]
Reviewed by Tom. http://github.com/280north/cappu...
-
Francisco Tolmasky
- Assigned user set to Ross Boucher
- Milestone set to 0.5.1
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.