Hey Folks,
looking through the forums I found that there was a previous post about linking against a growl.framework that had been compiled with -fobjc-gc. viewtopic.php?t=15353&highlight=fobjcgc
(sorry for not linking, this is my first post)
Whilst following that (used the available 1.1 source from the website) I managed to get my app to recognise the growl.framework and start properly.
I have hit a hiccup in that though the app is being registered with growl, there are no notifications being sent. I have setup a delegate class that returns an NSDictioinary with the notification names, though even inside the System Preferences pane, the notifications aren't displayed there. Is this a known bug with growl or is there something that I'm forgetting to do.
Thanks.
Problem displaying growl notifications when using -fobjc-gc
- evands
- Cocoaforge Admin
- Posts: 3152
- Joined: Thu Dec 02, 2004 10:55 pm
- Location: Decatur, GA
- Contact:
Growl with garbage collecting enabled works fine.
Use the constants listed in GrowlDefines.h rather than making up your own and you'll be fine
GROWL_NOTIFICATIONS_DEFAULT not @"GROWL_NOTIFICATIONS_DEFAULT"
GROWL_NOTIFICATIONS_ALL not @"GROWL_NOTIFICATIONS_ALL"
GROWL_NOTIFICATIONS_DEFAULT, for example, is defined as @"DefaultNotifications". You should use the constant in your code.
Use the constants listed in GrowlDefines.h rather than making up your own and you'll be fine
GROWL_NOTIFICATIONS_DEFAULT not @"GROWL_NOTIFICATIONS_DEFAULT"
GROWL_NOTIFICATIONS_ALL not @"GROWL_NOTIFICATIONS_ALL"
GROWL_NOTIFICATIONS_DEFAULT, for example, is defined as @"DefaultNotifications". You should use the constant in your code.
- evands
- Cocoaforge Admin
- Posts: 3152
- Joined: Thu Dec 02, 2004 10:55 pm
- Location: Decatur, GA
- Contact:
No problem. When a constant is defined, it will automatically be replaced at compile-time by whatever it 'really' is; for example, the compiler will replace GROWL_NOTIFICATIONS_DEFAULT with @"DefaultNotifications". Using the former is better because it is forced to be the same everywhere (preventing typos) and will automatically be updated if it is changed in the header file.
You may want to read http://www.stepwise.com/Articles/Techni ... 11.01.html to learn about memory management - I noticed several memory leaks in your sample code. I wasn't going to say anything since it was just a sample project, but if you're new to Cocoa they may not have been noticed.
You may want to read http://www.stepwise.com/Articles/Techni ... 11.01.html to learn about memory management - I noticed several memory leaks in your sample code. I wasn't going to say anything since it was just a sample project, but if you're new to Cocoa they may not have been noticed.