i'm stuck. '^' mean in code below? === code:
@implementation appcontroller - (ibaction) loadcomposition:(id)sender { void (^handler)(nsinteger); nsopenpanel *panel = [nsopenpanel openpanel]; [panel setallowedfiletypes:[nsarray arraywithobjects: @"qtz", nil]]; handler = ^(nsinteger result) { if (result == nsfilehandlingpanelokbutton) { nsstring *filepath = [[[panel urls] objectatindex:0] path]; if (![qcview loadcompositionfromfile:filepath]) { nslog(@"could not load composition"); } } }; [panel beginsheetmodalforwindow:qcwindow completionhandler:handler]; } @end === it's not xor of course.. thanks.
they're blocks, extension c apple introduced in 10.6. in case it's function runs once save panel has finished result of save panel. have read only access local variables of current method. more information see: http://developer.apple.com/mac/articles/cocoa/introblocksgcd.html
Forums Macs Mac Programming
iPhone Mac OS & System Software iPad Apple Watch Notebooks iTunes Apple ID iCloud Desktop Computers Apple Music Professional Applications iPod iWork Apple TV iLife Wireless
Comments
Post a Comment