Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 2, 2008, 04:33 AM   #1
rajneesh.deora
macrumors newbie
 
Join Date: Aug 2008
how we can resolve these Exceptions

hi all,
I have problem that when i click on the button then i got exceptions like

Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-960) (Sun May 18 18:38:33 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all

here is the code for the method that call on the click of button

-(IBAction) startTimer{
time=0.0;
finalDemoAppDelegate *appDeleg = (finalDemoAppDelegate *)[[UIApplication sharedApplication] delegate];
appDeleg.timer=[NSTimer scheduledTimerWithTimeInterval: 0.2
target: self
selector: @selector(incrementCounter
userInfo: nil
repeats: YES];
}

-(void)incrementCounter{
time=time+1;
[self updateLabel];

}
-(void)updateLabel{
lblTimer.text=[NSString stringWithFormat:@"%i",time];
}





I am not getting whts going to be wrong there.
Please help me resolve this exception.
Any help will be appreciable..

Awaiting for your reply..
Thanks in ADVANCE..
rajneesh.deora is offline   0 Reply With Quote
Old Sep 2, 2008, 04:37 AM   #2
Luke Redpath
macrumors 6502a
 
Join Date: Nov 2007
I imagine the error in this case is that you are passing the timer a selector for a method which doesn't exist. You are passing @selector(incrementCounter:) - note the colon implying the method takes an argument - where as your method selector will be @selector(incrementCounter).
Luke Redpath is offline   0 Reply With Quote
Old Sep 2, 2008, 04:43 AM   #3
rajneesh.deora
Thread Starter
macrumors newbie
 
Join Date: Aug 2008
Quote:
Originally Posted by Luke Redpath View Post
I imagine the error in this case is that you are passing the timer a selector for a method which doesn't exist. You are passing @selector(incrementCounter - note the colon implying the method takes an argument - where as your method selector will be @selector(incrementCounter).


What a silly mistake is this..
Thanks a lot
rajneesh.deora is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: How we get help from coupon codes? Thominner Community Discussion 0 Apr 7, 2011 10:31 PM
How we can change the UISegmentedControl style rajneesh.deora iPhone/iPad Programming 1 Sep 9, 2008 05:24 AM
how we can display current time rajneesh.deora iPhone/iPad Programming 2 Sep 3, 2008 03:12 AM
How we can integrate timer functionality rajneesh.deora iPhone/iPad Programming 5 Aug 28, 2008 01:47 PM
Lets see how we can rank as the youngest Macrumors user wake up Jobs!!! Community 84 Oct 1, 2002 09:44 PM


All times are GMT -5. The time now is 09:26 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC