私のアプリは、カントは、セレクタ(submitScoreを見つけるように見える:)しかし、私はすでにここSIGABRT「スタックの足りないフレーム」
それを宣言した:それはここに呼ばれ
@interface Highscores (Private)
- (void)loadCurrentPlayer;
- (void)loadHighscores;
- (void)updateHighscores;
- (void)saveCurrentPlayer;
- (void)saveHighscores;
- (void)button1Callback:(id)sender;
- (void)button2Callback:(id)sender;
-(void)button3Callback:(id)sender;
-(void)submitScore:(id)sender;
-(void)viewBoard:(id)sender
@end
を:
UIButton *mybutton1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
mybutton1.frame=CGRectMake(80, 50, 150, 40);
[mybutton1 setTitle:@"Submit Score" forState:UIControlStateNormal];
[mybutton1 addTarget:self action:@selector(submitScore:) forControlEvents:UIControlEventTouchUpInside];
UIButton *mybutton2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
mybutton2.frame=CGRectMake(80,100,150,40);
[mybutton2 setTitle:@"View Leaderboard" forState:UIControlStateNormal];
[mybutton2 addTarget:self action:@selector(viewBoard:) forControlEvents:UIControlEventTouchUpInside];
[myView addSubview:mybutton1];
[myView addSubview:mybutton2];
[myView release];
}
-(void)submitScore
{
NSString *request_url = [NSString stringWithFormat: @"http://192.168.18.8/lboard/addrank.php?did=%@&sre=%@&nme=%@&fmt=jsn",
currentScore, currentPlayer];
NSURL *url = [NSURL URLWithString:request_url];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
request.delegate=self;
[request setDidFinishSelector:@selector(requestFinished:)];
[request setDidFailSelector:@selector(requestFailed:)];
[request startAsynchronous];
私はそれらの2つのいずれかのボタンを押すと、必ず私はこのエラーを取得:
2011-12-22 14:27:32.462 tweejump[5381:707] -[Highscores submitScore:]: unrecognized selector sent to instance 0x267970
2011-12-22 14:27:32.469 tweejump[5381:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Highscores submitScore:]: unrecognized selector sent to instance 0x267970'
terminate called throwing an exceptionProgram received signal: “SIGABRT”.
私はlibを弱くリンクするような他のトピックで解決しようとしましたが、私はまだそのエラーを受け取ります。
他に何が必要ですか?どうすればSIGABRTを削除できますか?
おかげ
次に何をすればいいですか – NoobMe
'myButton1'を作成するときにメソッドシグネチャから' @ selector'のコロンを削除します。 O_Oは今、このエラーを取得イム –
は 'リモートMacOSXのプロトコル MEM 0x1000を0x3fffffffキャッシュ MEM 0x40000000から0xFFFFFFFFをなし MEM 0x00000000の0x0fffなし 実行 実行するリモート・モバイル/tmp/.XcodeGDBRemote-191-70 切り替えをターゲット... [スレッド7171への切り替え] [スレッド7171への切り替え] sharedlibrary apply-load-rules all continue プログラム受信信号: "EXC_BAD_ACCESS"。 /Developer_2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/dyld 'が変更されました。シンボルを再読する。 データフォーマッタは一時的に使用できません。「続行」後に再試行されます。 (現時点ではdlopenを呼び出すのは安全ではありません) kill quit' – NoobMe