Didn’t Snow Leopard introduce some alternative to the old beginSheet: method that allows using a block to do the finishing stuff? I don’t like having it in another callback method.
Didn’t Snow Leopard introduce some alternative to the old beginSheet: method that allows using
Share
Never mind. I found what I’m looking for at these two sites:
http://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html,
http://www.cocoabuilder.com/archive/cocoa/281058-sheets-blocks-and-garbage-collector.html
In fact, this is the code, and it’s fully compatible with both GC and non-GC: