@class
@class
- Subject: @class
- From: Audun Frøysaa <email@hidden>
- Date: Sun, 23 Mar 2008 11:28:06 +0100
Hello.
I need some help with different controllers.
I have
mainController.h & .m
iTunesMainController.h & .m
I then tries to access a method in the iTunesMainController from the
mainController.
mainController.h
@class iTunesMainController;
@interface mainController : NSObject {
iTunesMainController *iTunes;
mainController.m
#import "iTunesMainController.h"
- (void)applicationDidFinishLaunching:(NSNotification *)notification{
[iTunes setPlayMode:NO];
}
iTunesMainController.h i have this after the interface.
- (void)setPlayMode:(BOOL)mode;
iTunesMainController.m
- (void)setPlayMode:(BOOL)mode
{
BOOL stat;
if(mode == NO)
{
[[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\"
to stop"];
stat = NO;
} else {
[[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\"
to play"];
stat = YES;
}
}
This doesn't work at all. I have brakepoint in the
iTunesMainController but it seems like its never executed. I am sure i
have done something wrong, but i can't see it and i do not now what i
can search for on google.
This is just a test project but any help is much appreciated.
-Audun
Sorry for typos :-)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden