//
//  NSObject-PerformSelector.h
//  PanicCore
//
//  Created by Ian Cely on 7/29/08.
//  Copyright 2008 Panic Inc.. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (PCPerformSelector)

// someArgs may be nil for no arguments, otherwise someArgs are set as arguments
// to selector in order. Use [NSNull null] to pass nil as an argument.
- (void)pc_performSelectorOnMainThread:(SEL)selector withArguments:(NSArray*)someArgs waitUntilDone:(BOOL)shouldWait;
- (void)pc_performSelectorOnMainThread:(SEL)selector withArguments:(NSArray*)someArgs waitUntilDone:(BOOL)shouldWait modes:(NSArray*)someModes;
- (id)pc_performSelector:(SEL)selector withArguments:(NSArray*)someArgs;

- (BOOL)pc_performOptionalSelectorWithBOOLReturn:(SEL)selector;
- (NSInteger)pc_performOptionalSelectorWithIntegerReturn:(SEL)selector;

@end
