• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
@class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@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


  • Follow-Ups:
    • Re: @class
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: Adding commandline batch mode to Cocoa app
  • Next by Date: Beginner question - the differences between .h and .m
  • Previous by thread: Re: How to make whole view be drop target for small subview
  • Next by thread: Re: @class
  • Index(es):
    • Date
    • Thread