Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-19-2010, 06:11 AM   #1 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default Issues Connecting BOOL To UISwitch

I am creating an alarm clock for myself and need to tell the app that the alarm is active and so I figure I will just put in a UISwitch. Also, I figure that I can just have the switch change the value of my BOOL so that no matter what view I am in I can still check the state of the switch.

I put the BOOL in the app delegate:
Code:
#import <UIKit/UIKit.h>

@class MainViewController;

@interface AlarmClockAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MainViewController *mainViewController;
	
	BOOL normalAlarmPower;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MainViewController *mainViewController;
@property (nonatomic, assign) BOOL normalAlarmPower;

@end
Then in settings view controller I put in an IBAction that does this:
Code:
-(IBAction)normalAlarmState:(id)sender {
	
	if (alarmPower.on) {
		
		appDelegate.normalAlarmPower = NO;
		NSLog(@"BOOL = %d", (int)appDelegate.normalAlarmPower);
		
	}
	else {
		
		appDelegate.normalAlarmPower = YES;
		NSLog(@"BOOL = %d", (int)appDelegate.normalAlarmPower);
		
	}
	
}
I have an IBOutlet UISwitch in the .h file that I have connected to the UISwitch in Interface Builder as well as connecting the IBAction to the switch....

When I check the console all I see when I switch the switch is this:
Code:
2010-09-19 03:53:33.271 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.271 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.272 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.272 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.553 AlarmClock[6274:207] BOOL = 0
What am I doing wrong? Why isn't the value of the BOOL changing?

I have been researching for days now and can't seem to find anything helpful.

Any help GREATLY appreciated. Please & Thank You
viperfan91 is offline   Reply With Quote
Old 09-19-2010, 11:20 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 4
MacDude101 is on a distinguished road
Default

Have you tried simplifying your IBAction to:

Code:
-(IBAction)normalAlarmState:(id)sender {
	appDelegate.normalAlarmPower = !alarmPower.on;	
}
This means that normalAlarmPower is the opposite to alarmPower.

So if alarmPower.on = YES, normalAlarmPower = NO and vice versa.
MacDude101 is offline   Reply With Quote
Old 09-19-2010, 03:18 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post
I am creating an alarm clock for myself and need to tell the app that the alarm is active and so I figure I will just put in a UISwitch. Also, I figure that I can just have the switch change the value of my BOOL so that no matter what view I am in I can still check the state of the switch.

I put the BOOL in the app delegate:
Code:
#import <UIKit/UIKit.h>

@class MainViewController;

@interface AlarmClockAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MainViewController *mainViewController;
	
	BOOL normalAlarmPower;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MainViewController *mainViewController;
@property (nonatomic, assign) BOOL normalAlarmPower;

@end
Then in settings view controller I put in an IBAction that does this:
Code:
-(IBAction)normalAlarmState:(id)sender {
	
	if (alarmPower.on) {
		
		appDelegate.normalAlarmPower = NO;
		NSLog(@"BOOL = %d", (int)appDelegate.normalAlarmPower);
		
	}
	else {
		
		appDelegate.normalAlarmPower = YES;
		NSLog(@"BOOL = %d", (int)appDelegate.normalAlarmPower);
		
	}
	
}
I have an IBOutlet UISwitch in the .h file that I have connected to the UISwitch in Interface Builder as well as connecting the IBAction to the switch....

When I check the console all I see when I switch the switch is this:
Code:
2010-09-19 03:53:33.271 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.271 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.272 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.272 AlarmClock[6274:207] BOOL = 0
2010-09-19 03:53:33.553 AlarmClock[6274:207] BOOL = 0
What am I doing wrong? Why isn't the value of the BOOL changing?

I have been researching for days now and can't seem to find anything helpful.

Any help GREATLY appreciated. Please & Thank You

You show the property declaration for normalAlarmPower, but how do you create the getter and setter? Do you use @synthesize, or create custom getter and setter methods? Show us that.

Also, in your normalAlarmState method, print the value of your appDelegate variable. If that's nil, you'll always get zero for any property.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-19-2010, 06:11 PM   #4 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default

Quote:
Originally Posted by Duncan C View Post
You show the property declaration for normalAlarmPower, but how do you create the getter and setter? Do you use @synthesize, or create custom getter and setter methods? Show us that.

Also, in your normalAlarmState method, print the value of your appDelegate variable. If that's nil, you'll always get zero for any property.
I used @synthesize:

Code:
@synthesize delegate, timePicker, setAlarmTime, currentTime, alarmPower, appDelegate;
How do I output the value of appDelegate?

I took a stab at it and did this:
Code:
NSLog(@"BOOL = %d", (int)appDelegate);
and still got the same response "BOOL = 0"

Thanks for the help guys
viperfan91 is offline   Reply With Quote
Old 09-19-2010, 07:01 PM   #5 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post
I used @synthesize:

Code:
@synthesize delegate, timePicker, setAlarmTime, currentTime, alarmPower, appDelegate;
How do I output the value of appDelegate?

I took a stab at it and did this:
Code:
NSLog(@"BOOL = %d", (int)appDelegate);
and still got the same response "BOOL = 0"

Thanks for the help guys
Code:
NSLog(@"BOOL = %d appDelegate = %@", alarmPower, appDelegate);
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-19-2010, 07:34 PM   #6 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default

ok cool thanks.....so.... lol

I am getting this:
Code:
2010-09-19 17:32:26.073 AlarmClock[7513:207] BOOL = 93493792 appDelegate = (null)
I'm guessing that's what I don't want haha so yeah...

What do I do?

Can you walk me through it or point me to a "dummy proof" tutorial or something?
viperfan91 is offline   Reply With Quote
Old 09-19-2010, 07:54 PM   #7 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post
ok cool thanks.....so.... lol

I am getting this:
Code:
2010-09-19 17:32:26.073 AlarmClock[7513:207] BOOL = 93493792 appDelegate = (null)
I'm guessing that's what I don't want haha so yeah...

What do I do?

Can you walk me through it or point me to a "dummy proof" tutorial or something?
In your AlarmClockAppDelegate class's viewDidLoad method, add the following:

Code:
appDelegate = (AppDelegateClass)[UIApplication sharedApplication].delegate;
Where you need to replace AppDelegateClass with the class name of your custom app delegate.

That's all there is to it.

You could also create an instance of your view controller in your mainWindow.xib, and connect your view controller's appDelegate property to the application delegate in interface builder. That's what I usually do.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-19-2010, 09:00 PM   #8 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default

Quote:
Originally Posted by Duncan C View Post
In your AlarmClockAppDelegate class's viewDidLoad method, add the following:

Code:
appDelegate = (AppDelegateClass)[UIApplication sharedApplication].delegate;
Where you need to replace AppDelegateClass with the class name of your custom app delegate.

That's all there is to it.

You could also create an instance of your view controller in your mainWindow.xib, and connect your view controller's appDelegate property to the application delegate in interface builder. That's what I usually do.
When I connect the application delegate to appDelegate in the in the MainWindow.xib.....nothing happens.

I did that and then run the app and get the same response: "(null)"

I think I am missing something pretty big here
viperfan91 is offline   Reply With Quote
Old 09-19-2010, 09:04 PM   #9 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post
When I connect the application delegate to appDelegate in the in the MainWindow.xib.....nothing happens.

I did that and then run the app and get the same response: "(null)"

I think I am missing something pretty big here
So add the line of code I posted to your viewDidLoad method.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-19-2010, 09:45 PM   #10 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default

ok so for that code it would be

Code:
appDelegate = (AlarmClockAppDelegate)[UIApplication sharedApplication].delegate;
?

cuz if i add that I just get an error saying that appDelegate isn't declared...


P.S. I just wanted to thank you again for your help. Your the first person to have offered help like this on anything I've done.
viperfan91 is offline   Reply With Quote
Old 09-20-2010, 06:40 AM   #11 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post
ok so for that code it would be

Code:
appDelegate = (AlarmClockAppDelegate)[UIApplication sharedApplication].delegate;
?

cuz if i add that I just get an error saying that appDelegate isn't declared...


P.S. I just wanted to thank you again for your help. Your the first person to have offered help like this on anything I've done.
double-check the spelling and capitalization of AlarmClockAppDelegate. Better yet, copy the string from AlarmClockAppDelegate.h.

You also need to #include "AlarmClockAppDelegate.h" in your class's header file. That's probably the step that you were missing.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-20-2010, 04:41 PM   #12 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default



Ive tried what you said and then gone back and tried putting "appDelegate = (AlarmClockAppDelegate)[UIApplication sharedApplication].delegate;" in the AlarmNormalViewController.m file and it was able to find the appDelegate declaration but it still gave the non-scalar type error.

Here is the code I have have a look cuz I'm kinda lost.... :
AlarmNormalViewController.h
Code:
#import <UIKit/UIKit.h>
#import "AlarmClockAppDelegate.h"

@protocol AlarmNormalViewControllerDelegate;


@interface AlarmNormalViewController : UIViewController {
	id <AlarmNormalViewControllerDelegate> delegate;
	AlarmClockAppDelegate *appDelegate;
	IBOutlet UIDatePicker *timePicker;
	IBOutlet UILabel *setAlarmTime;
	NSString *currentTime;
	IBOutlet UISwitch *alarmPower;	
}

@property (nonatomic, retain) UIDatePicker *timePicker;
@property (nonatomic, retain) IBOutlet UILabel *setAlarmTime;
@property (nonatomic, retain) NSString *currentTime;
@property (nonatomic, retain) IBOutlet UISwitch *alarmPower;
@property (nonatomic, assign) id <AlarmNormalViewControllerDelegate> delegate;
@property (nonatomic, assign) AlarmClockAppDelegate *appDelegate;


- (IBAction)done:(id)sender;
- (IBAction)setAlarm:(id)sender;

@end


@protocol AlarmNormalViewControllerDelegate
- (void)alarmNormalViewControllerDidFinish:(AlarmNormalViewController *)alarmController;
@end
AlarmNormalViewController.m
Code:
#import "AlarmNormalViewController.h"
#import "AlarmClockAppDelegate.h"

@implementation AlarmNormalViewController

@synthesize delegate, timePicker, setAlarmTime, currentTime, alarmPower, appDelegate;


- (void)viewDidLoad {
    [super viewDidLoad];
		//Set background of view to viewFlipsideBackgroundColor
	self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor]; 
	
		//Set UIDatePicker to current time
	NSDate *now = [[NSDate alloc] init];
	[timePicker setDate:now animated:YES];
	[now release];
	
		//Link ON/OFF switch to method "switchingAlarmPower"
		//[alarmPower addTarget:self action:@selector(switchingAlarmPower) forControlEvents:UIControlEventValueChanged];
}


-(IBAction)normalAlarmState:(id)sender {
		//normalAlarmPower = !alarmPower.on;
		//NSLog(@"BOOL = %d", alarmPower);
	
	if (alarmPower.on) {
		
		appDelegate.normalAlarmPower = YES;
		NSLog(@"BOOL = %d appDelegate = %@", alarmPower, appDelegate);
		
	}
	else {
		
		appDelegate.normalAlarmPower = NO;
		NSLog(@"BOOL = %d appDelegate = %@", alarmPower, appDelegate);
		
	}
	
}

- (IBAction)done:(id)sender {
	[self.delegate alarmNormalViewControllerDidFinish:self];	
}

- (IBAction)setAlarm:(id)sender {

	NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
	[dateFormatter setDateStyle:NSDateFormatterNoStyle];
	[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
	currentTime = [dateFormatter stringFromDate:[timePicker date]];
	
	self.setAlarmTime.text = currentTime;
	[dateFormatter release];	
}


- (void)didReceiveMemoryWarning {
		// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
		// Release any cached data, images, etc that aren't in use.
}


- (void)viewDidUnload {
		// Release any retained subviews of the main view.
		// e.g. self.myOutlet = nil;
}


/*
 // Override to allow orientations other than the default portrait orientation.
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 // Return YES for supported orientations
 return (interfaceOrientation == UIInterfaceOrientationPortrait);
 }
 */


- (void)dealloc {
    [super dealloc];
}


@end
AlarmClockAppDelegate.h
Code:
#import <UIKit/UIKit.h>

@class MainViewController;

@interface AlarmClockAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MainViewController *mainViewController;
	
	BOOL normalAlarmPower;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MainViewController *mainViewController;
@property (nonatomic, assign) BOOL normalAlarmPower;

@end
AlarmClockAppDelegate.m
Code:
#import "AlarmClockAppDelegate.h"
#import "MainViewController.h"

@implementation AlarmClockAppDelegate

@dynamic normalAlarmPower;

@synthesize window;
@synthesize mainViewController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
    // Override point for customization after application launch.  

    // Add the main view controller's view to the window and display.
    [window addSubview:mainViewController.view];
    [window makeKeyAndVisible];

    return YES;
}

-(void)viewdidload {
	
	appDelegate = (AlarmClockAppDelegate)[UIApplication sharedApplication].delegate;

}

- (void)applicationWillResignActive:(UIApplication *)application {
    /*
     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
     */
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
    /*
     Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
     If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
     */
}


- (void)applicationWillEnterForeground:(UIApplication *)application {
    /*
     Called as part of  transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
     */
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    /*
     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
     */
}


- (void)applicationWillTerminate:(UIApplication *)application {
    /*
     Called when the application is about to terminate.
     See also applicationDidEnterBackground:.
     */
}


#pragma mark -
#pragma mark Memory management

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
    /*
     Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
     */
}


- (void)dealloc {
    [mainViewController release];
    [window release];
    [super dealloc];
}

@end
viperfan91 is offline   Reply With Quote
Old 09-20-2010, 06:17 PM   #13 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by viperfan91 View Post


Ive tried what you said and then gone back and tried putting "appDelegate = (AlarmClockAppDelegate)[UIApplication sharedApplication].delegate;" in the AlarmNormalViewController.m file and it was able to find the appDelegate declaration but it still gave the non-scalar type error.

Here is the code I have have a look cuz I'm kinda lost.... :

--snip---
Oh lordy. You are totally lost, aren't you?

There are several things wrong that I can see.

The system doesn't expect a viewDidLoad method in your app delegate unless it's also a view controller, which yours is not.

Thus, the viewDidLoad you put in your app delegate will never be called.

You need to have your AlarmNormalViewController class be able to get to the app delegate. Setting an "appDelegate" variable in your app delegate doesn't do you any good, because any object can always refer to itself as "self"

You want the following line in your AlarmNormalViewController object's viewDidLoad method:

appDelegate = (AlarmClockAppDelegate*)[UIApplication sharedApplication].delegate;


You were missing an asterisk in the type cast. (I marked the change in bold)

You need to stop flailing around, slapping code here and there without any real idea of what you're doing and do some studying. I'd suggest buying a book that teaches you beginning iPhone development and going through every exercise in the first few chapters until you understand the basics. Pay particular attention to memory management. If you don't understand object owernship, when to retain, when to release, and how to use properties, your code is going to crash in weird places and leak memory like a sieve.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 09-20-2010, 10:12 PM   #14 (permalink)
Registered Member
 
viperfan91's Avatar
 
Join Date: Apr 2010
Location: NorCal
Age: 21
Posts: 19
viperfan91 is on a distinguished road
Default

Quote:
Originally Posted by Duncan C View Post
Oh lordy. You are totally lost, aren't you?

There are several things wrong that I can see.

The system doesn't expect a viewDidLoad method in your app delegate unless it's also a view controller, which yours is not.

Thus, the viewDidLoad you put in your app delegate will never be called.

You need to have your AlarmNormalViewController class be able to get to the app delegate. Setting an "appDelegate" variable in your app delegate doesn't do you any good, because any object can always refer to itself as "self"

You want the following line in your AlarmNormalViewController object's viewDidLoad method:

appDelegate = (AlarmClockAppDelegate*)[UIApplication sharedApplication].delegate;


You were missing an asterisk in the type cast. (I marked the change in bold)

You need to stop flailing around, slapping code here and there without any real idea of what you're doing and do some studying. I'd suggest buying a book that teaches you beginning iPhone development and going through every exercise in the first few chapters until you understand the basics. Pay particular attention to memory management. If you don't understand object owernship, when to retain, when to release, and how to use properties, your code is going to crash in weird places and leak memory like a sieve.

oh ok however after I add that now my app crashes when I flip the switch. There is apparently more that I'm missing....is there any particular book your suggest that will help me out...

oh and here is the the console readout when it crashes:
Code:
2010-09-20 20:14:43.249 AlarmClock[2680:207] -[AlarmClockAppDelegate setNormalAlarmPower:]: unrecognized selector sent to instance 0x5d0dc50
2010-09-20 20:14:43.333 AlarmClock[2680:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AlarmClockAppDelegate setNormalAlarmPower:]: unrecognized selector sent to instance 0x5d0dc50'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x023a2919 __exceptionPreprocess + 185
	1   libobjc.A.dylib                     0x024f05de objc_exception_throw + 47
	2   CoreFoundation                      0x023a442b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
	3   CoreFoundation                      0x02314116 ___forwarding___ + 966
	4   CoreFoundation                      0x02313cd2 _CF_forwarding_prep_0 + 50
	5   AlarmClock                          0x0000359e -[AlarmNormalViewController normalAlarmState:] + 111
	6   UIKit                               0x002c6e14 -[UIApplication sendAction:to:from:forEvent:] + 119
	7   UIKit                               0x00495c41 -[_UISwitchSlider sendAction:to:forEvent:] + 104
	8   UIKit                               0x0035271b -[UIControl(Static) _sendDelayedActions:] + 477
	9   UIKit                               0x003505cf -[UIControl(Internal) _sendDelayedActions] + 42
	10  UIKit                               0x003cce47 -[UISlider _sendDelayedActions] + 110
	11  Foundation                          0x00045cea __NSFireDelayedPerform + 441
	12  CoreFoundation                      0x02383d43 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
	13  CoreFoundation                      0x02385384 __CFRunLoopDoTimer + 1364
	14  CoreFoundation                      0x022e1d09 __CFRunLoopRun + 1817
	15  CoreFoundation                      0x022e1280 CFRunLoopRunSpecific + 208
	16  CoreFoundation                      0x022e11a1 CFRunLoopRunInMode + 97
	17  GraphicsServices                    0x02c072c8 GSEventRunModal + 217
	18  GraphicsServices                    0x02c0738d GSEventRun + 115
	19  UIKit                               0x002d4b58 UIApplicationMain + 1160
	20  AlarmClock                          0x00002104 main + 102
	21  AlarmClock                          0x00002095 start + 53
)
terminate called after throwing an instance of 'NSException'

Last edited by viperfan91; 09-20-2010 at 10:18 PM.
viperfan91 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 309
15 members and 294 guests
2ndSegment, cayladv57, cgokey, dermotos, djohnson, Domele, Hamad, heshiming, linkmx, markuschow, pungs, Sloshmonster, teebee74, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:59 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0