Re: Growl Support?
Re: Growl Support?
- Subject: Re: Growl Support?
- From: Janakiram <email@hidden>
- Date: Tue, 21 Feb 2006 16:22:22 +0530
HI,
We shouldn't write the awakeFromNib Definition in the .h file. Since
you are implementing the same definition in both .h & .m so you are
getting the duplicate definition error.
You should give method declaration in .h file and its corresponding
definition in .m file
-JanakiRam
On 21-Feb-06, at 4:13 PM, themacuser wrote:
Changed it to:
#import "GrowlDelegate.h"
#import <Growl/Growl.h>
@implementation GrowlDelegate : NSObject
<GrowlApplicationBridgeDelegate>
- (void)awakeFromNib {
[GrowlApplicationBridge setGrowlDelegate:self];
[GrowlApplicationBridge notifyWithTitle:@"test"
description:@"description" notificationName:@"notifyname"];
}
@end
Still won't compile - gets a parse error.
#import "GrowlDelegate.h"
#import <Growl/Growl.h>
@interface GrowlDelegate : NSObject <GrowlApplicationBridgeDelegate>
- (void)awakeFromNib {
[GrowlApplicationBridge setGrowlDelegate:self];
[GrowlApplicationBridge notifyWithTitle:@"test"
description:@"description" notificationName:@"notifyname"];
}
@end
Gets a warning about a duplicate definition. And a parse error on {.
What should I change it to? Sorry, I'm fairly new to Cocoa.
On 20/02/2006, at 10:40 PM, Julian Cain wrote:
You are missing: < GrowlApplicationBridgeDelegate>
@interface GrowlController : NSObject
<GrowlApplicationBridgeDelegate> {
~Julian Cain
email@hidden
On Feb 20, 2006, at 7:03 AM, themacuser wrote:
I'm working on adding Growl support to KisMac.
I've added the Growl bundle into the project, added a new "Copy
Files" step into the build process to throw it into Frameworks,
and created a new NSObject subclass called GrowlDelegate.
I then edited GrowlDelegate.m and wrote this:
#import "GrowlDelegate.h"
#import <Growl/Growl.h>
@implementation GrowlDelegate
- (void)awakeFromNib {
[GrowlApplicationBridge setGrowlDelegate:self];
[GrowlApplicationBridge notifyWithTitle:@"test"
description:@"description" notificationName:@"notifyname"];
}
@end
Upon building, I get the warnings:
Warning: class 'GrowlDelegate doesn't implement the
'GrowlApplicationBridgeDelegate' protocol.
Warning: 'GrowlApplicationBridge' may not respond to
'+notifyWithTitle:description:notificationName:'
What am I doing wrong here? (actually, aside from not registering
the app with Growl first, I just realised I should do that, but
I'd like the app to compile properly first).
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40effigent.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden