This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A protocol that can be adopted by ErrorType, RawRepresentable conforming types that | |
/// provides a mechanism for providing NSError userInfo values. | |
/// | |
/// There are nil returning default implementations of all of the members of this protocol. | |
protocol NSErrorUserInfoValueProviding { | |
var localizedDescription: String? { get } | |
var localizedFailureReason: String? { get } | |
var localizedRecoverySuggestion: String? { get } | |
var localizedRecoveryOptions: [String]? { get } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- `menu_click`, by Jacob Rus, September 2006 | |
-- | |
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}` | |
-- Execute the specified menu item. In this case, assuming the Finder | |
-- is the active application, arranging the frontmost folder by date. | |
on menu_click(mList) | |
local appName, topMenu, r | |
-- Validate our input | |
if mList's length < 3 then error "Menu list is not long enough" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) encodeWithCoder: (NSCoder*) coder | |
{ | |
#define X(type, ivar) [coder encode##type:ivar forKey:@#ivar]; | |
#define BOX(type, ivar) [coder encodeObject:([NSValue valueWith##type:ivar]) forKey:@#ivar]; | |
XEncodeIvars | |
#undef BOX | |
#undef X | |
} | |
-(id) initWithCoder: (NSCoder*) decoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) encodeWithCoder: (NSCoder*) coder | |
{ | |
#define X(type, ivar) [coder encode##type:ivar forKey:@#ivar]; | |
XEncodeIvars | |
#undef X | |
} | |
-(id) initWithCoder: (NSCoder*) decoder | |
{ | |
#define X(type, ivar) ivar = [decoder decode##type##ForKey:@#ivar]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* thread #1: tid = 0x1c03, 0x37447724 libc++abi.dylib`__cxa_throw, stop reason = breakpoint 1.1 | |
frame #0: 0x37447724 libc++abi.dylib`__cxa_throw | |
frame #1: 0x330fe296 libobjc.A.dylib`objc_exception_throw + 94 | |
frame #2: 0x37dcd788 CoreFoundation`+[NSException raise:format:arguments:] + 100 | |
frame #3: 0x37dcd7aa CoreFoundation`+[NSException raise:format:] + 34 | |
frame #4: 0x36f9a618 Foundation`-[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 740 | |
frame #5: 0x36f9a286 Foundation`-[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 170 | |
frame #6: 0x30f4799c UIKit`-[UIWebPDFView _removeBackgroundImageObserverIfNeeded:] + 108 | |
frame #7: 0x30f47bfc UIKit`-[UIWebPDFView dealloc] + 540 | |
frame #8: 0x330fa174 libobjc.A.dylib`_objc_rootRelease + 36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CAT(a, b) _PRIMITIVE_CAT(a, b) | |
#define _PRIMITIVE_CAT(a, b) a##b | |
#define N_ARGS(...) N_ARGS_1(__VA_ARGS__, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) | |
#define N_ARGS_1(...) N_ARGS_2(__VA_ARGS__) | |
#define N_ARGS_2(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, n, ...) n | |
#define PROPERTY(policy, ...) CAT(_PROPERTY_, N_ARGS(__VA_ARGS__))(policy, __VA_ARGS__) | |
#define PROPERTY_STRONG(...) PROPERTY(retain, __VA_ARGS__) | |
#define PROPERTY_WEAK(...) PROPERTY(assign, __VA_ARGS__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[merge] | |
keepBackup = false | |
tool = custom | |
[mergetool "custom"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED" | |
keepTemporaries = false | |
trustExitCode = false | |
keepBackup = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
\def N_ARGS | |
\brief Macro that can tell how many variable arguments have been passed to it (up to a total of 16). | |
*/ | |
#define N_ARGS(...) N_ARGS_1(__VA_ARGS__, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) | |
#define N_ARGS_1(...) N_ARGS_2(__VA_ARGS__) | |
#define N_ARGS_2(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, n, ...) n | |
/*! | |
\def CAT |