45:23 Could create two images outside the loop and swap between those inside. Thanks for the series :)
while it's been a couple of years and I am sure you've gotten a lot better at vim since then, just in case, if you want to replace a pattern with another, you could enter command :%s/pattern_to_replace/pattern_to_replace_with/g
I almost managed to make this work on my own, but God this is hard to even google information how to do. I managed to make a unsafe buffer show up on the screen using a NSBitmapImageRep, but it has some severely odd behaviours I have yet to figure out. I can’t wait to have a look at this video to see if there is either a hint of what I am missing or another way of doing what I am trying to achieve, which is basically see a slow drawing operation taking place while it is drawing rather than waiting for it to complete before it is showing. Edit: Actually this was exactly the same as I was doing. You are using an NSImage while I am drawing in the NSView straight from the image rep. I tried using a NSImage, but am having the same bug either way, so there is something I am not quite getting. I am not sure why it is not working in my case, but it must be something very silly. Edit 2: storyboard present a default view. I used that view. I thought to myself to rule out something by making a NSView on top of the default view. Then bam! That was the whole problem with seemingly up and down orientation fighting going on in my buffer drawing.
Hi Theo. First I want to say a big thank you for the work you're putting in. I have question regarding Apple's documentation. For example, from the line of code: 'window.contentView.layer.contents = image;' I assume that 'layer' is a member of 'contentView' however on the documentation here: https://developer.apple.com/documentation/appkit/nswindow/1419160-contentview?language=objc 'layer' is not listed. This leads me to ask where is this functionality documented? Thanks again.
I know some header files on windows have macro cases if c++ is not defined, hence provide declarations in a procedural orientation. Do the header files for an NS application have the same case.
https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html#//apple_ref/doc/uid/TP30001066-CH203-CJBHBFFE Old apple docs that may be able to speed up some of this process using the low level api's of MacOsx
Hi Ted, I'm trying to free the image and representation memory via the 'release' message (like you have written at https://youtu.be/0xLYfJfuO50?t=2415), but I'm still leaking memory like crazy. If I don't call the 'addRepresentation' message or set the image to the window...contents then memory doesn't leak. I couldn't find anything in the documentation to say what these functions might be doing to cause leaks. Do you have any idea? I was hoping you would try running without autorelease in the video.
@karlforshaw