Hello,
Thanks for your response.

On Mon, Dec 7, 2009 at 10:44 PM, Peter Hosey <[email protected]> wrote:

> 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.

In my main app it is bundled with in the app itself. I used the code for
demonstration only.

> 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.

Actually, i think something got lost in the posting itself, it is
indented within the body of applicationDidFinishLaunching
Even below, it looks unindented, but it is.

>
> 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.

This I hadn't realized.  I changed the code so that
GrowlApplicationBridge.notify...
would be on one line(very unappealing), yet it still doesn't work.

(the log shows u is None, so PyObjc is now executing the method notifyWith...)

from Foundation import *
from AppKit import *
import objc,os
objc.loadBundle("GrowlApplicationBridge"
                ,globals()
                ,bundle_path=objc.pathForFramework(
                    "/Library/Frameworks/Growl.framework"))

class axaAppDelegate(NSObject):
    def applicationDidFinishLaunching_(self,sender):
        GrowlApplicationBridge.setGrowlDelegate_(u"")
u=GrowlApplicationBridge.notifyWithTitle_description_notificationName_iconData_priority_isSticky_clickContext_(u"Alert",u"Hello
Frome me",u"Example",None,0,False,NSDate.date())
        print u


Regards
Saptarshi

--

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.


Reply via email to