我想要調用具有通常NSError的方法的選擇**論點:需要/想傳遞一個NSError **作爲參數傳遞給performSelector
-(int) getItemsSince:(NSDate *)when dataSelector:(SEL)getDataSelector error:(NSError**)outError {
NSArray *data = nil;
if([service respondsToSelector:getDataSelector]) {
data = [service performSelector:getDataSelector withObject:when withObject:outError];
// etc.
...,編譯器沒有按」 t like:
warning: passing argument 3 of 'performSelector:withObject:withObject:' from incompatible pointer type
有沒有什麼辦法可以封裝指針的對象?
只是爲了正確性 - [自methodSignatureForSelector:getDataSelector]在第三行上面應該是[服務methodSignatureForSelector:getDataSelector] – edoloughlin 2009-05-21 11:22:08