gpt4 book ai didi

iphone - 调用另一个类的方法时抛出 'NSException' 错误实例后终止调用

转载 作者:行者123 更新时间:2023-11-29 04:54:18 25 4
gpt4 key购买 nike

我正在调用另一个类的方法,但我不能,并且收到此错误。我搜索了它,但没有找到任何可以解决这个问题的东西。请帮忙。

代码:

adres = [adres stringByAppendingString:[NSString stringWithFormat:@"%@", textArama.text]];

BaseHttpPost *m_HttpDownloadSearch = [[[self class] alloc] init];
[m_HttpDownloadSearch HttpPost:adres data:@""];

错误是:

    2011-11-26 00:46:10.386 Sarki Sözleri[1520:207] -[Sarki_So_zleriViewController HttpPost:data:]: unrecognized selector sent to instance 0x4b6ad30
2011-11-26 00:46:10.388 Sarki Sözleri[1520:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Sarki_So_zleriViewController HttpPost:data:]: unrecognized selector sent to instance 0x4b6ad30'
*** Call stack at first throw:
(
0 CoreFoundation 0x00e315a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f85313 objc_exception_throw + 44
2 CoreFoundation 0x00e330bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00da2966 ___forwarding___ + 966
4 CoreFoundation 0x00da2522 _CF_forwarding_prep_0 + 50
5 Sarki SoÃàzleri 0x0000250e -[Sarki_So_zleriViewController btnAra_click:] + 382
6 UIKit 0x000834fd -[UIApplication sendAction:to:from:forEvent:] + 119
7 UIKit 0x00113799 -[UIControl sendAction:to:forEvent:] + 67
8 UIKit 0x00115c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
9 UIKit 0x001147d8 -[UIControl touchesEnded:withEvent:] + 458
10 UIKit 0x000a7ded -[UIWindow _sendTouchesForEvent:] + 567
11 UIKit 0x00088c37 -[UIApplication sendEvent:] + 447
12 UIKit 0x0008df2e _UIApplicationHandleEvent + 7576
13 GraphicsServices 0x0130a992 PurpleEventCallback + 1550
14 CoreFoundation 0x00e12944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15 CoreFoundation 0x00d72cf7 __CFRunLoopDoSource1 + 215
16 CoreFoundation 0x00d6ff83 __CFRunLoopRun + 979
17 CoreFoundation 0x00d6f840 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x00d6f761 CFRunLoopRunInMode + 97
19 GraphicsServices 0x013091c4 GSEventRunModal + 217
20 GraphicsServices 0x01309289 GSEventRun + 115
21 UIKit 0x00091c93 UIApplicationMain + 1160
22 Sarki SoÃàzleri 0x00001d09 main + 121
23 Sarki SoÃàzleri 0x00001c85 start + 53
)
terminate called after throwing an instance of 'NSException'

请帮助我!!

最佳答案

您不应该使用[[[self class] alloc] init]。您可能需要[BaseHttpPost alloc] init]

关于iphone - 调用另一个类的方法时抛出 'NSException' 错误实例后终止调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8274937/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com