On Dec 7, 2009, at 16:24:45, Fishtank wrote:
> objc.loadBundle("GrowlApplicationBridge"
> ,globals()
> ,bundle_path=objc.pathForFramework(
> "/Library/Frameworks/Growl.framework"))
The framework is not likely to be there, and you should not install it
there. You should bundle it as part of your app instead, and use
NSBundle to find its location.
> class axaAppDelegate(NSObject):
> def applicationDidFinishLaunching_(self, sender):
> NSLog("Application did finish launching.")
> GrowlApplicationBridge.setGrowlDelegate_(self)
>
> GrowlApplicationBridge
> .notifyWithTitle_description_notificationName_iconData_priority_isSticky_clickContext_
> (
> u"Alert",
> u"Hello Frome me",
> u"Example",
> None,
> 2,
> True,
> None)
You send the notify message as part of your main program, *before*
your app delegate instance (assuming you have one) receives the
applicationDidFinishLaunching: message and registers by setting the
Growl delegate. This won't work: You cannot notify until you've
registered, and the Growl framework requires either a Growl delegate*
or a registration dictionary file to function.
In this simple case, indenting the
notifyWithTitle
:description:notificationName:iconData:priority:isSticky:clickContext:
message so that it's within the applicationDidFinishLaunching:
implementation would solve the problem.
Also, you need to move the left parenthesis onto the same line as the
method name, because Python will consider the
“GrowlApplicationBridge.notify…” line to look up the method and do
nothing with it, and the “(” line as the start of a tuple, which you
simply throw away.
*And, due to a bug (#76), it always requires a Growl delegate.
--
You received this message because you are subscribed to the Google Groups
"Growl Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/growldiscuss?hl=en.