Skip to content

Instantly share code, notes, and snippets.

@withgod
Created March 17, 2011 03:41
Show Gist options
  • Save withgod/873791 to your computer and use it in GitHub Desktop.
Save withgod/873791 to your computer and use it in GitHub Desktop.
Growl::Any test
#!/usr/bin/perl
use Growl::Any;
my $growl = Growl::Any->new("my app", ["event1", "event2"]);
$growl->notify("event1", "title", "message");
@withgod
Copy link
Author

withgod commented Mar 17, 2011

http://paste2.org/p/1307186

前者は動くけど後者は動かない(通知が出ないけど、エラーも出ない)
registする時点で日本語アプリ名がレジスト出来ないっぽい(UTF8の扱い云々?適当。)
あとふと思ったのが、Growl::AnyのコンストラクタとMac::Growlのコンストラクタに差異が有りますね、Mac::GrowlはdefaultNotificationsが必須っぽい。

perlはos xに付随のperl(今試してるのは無印leopard(10.5))
perl -v
This is perl, v5.8.8 built for darwin-thread-multi-2level
(with 4 registered patches, see perl -V for more detail)

@withgod
Copy link
Author

withgod commented Mar 17, 2011

こんな感じに用意してみた

http://paste2.org/p/1307265

ら、今まで化けてなかった前者の通知が化け始めたのと、後者の部分で "e-q.plを動かしてみたら"の時と同じエラーが出始めた

~/Documents/code/mac-growl% perl ./m-g2.pl                                                                                                                 
**** ERROR **** PerlObjCBridge: convertPerlToObjC(): Referenced thingy not blessed
**** ERROR **** PerlObjCBridge: convertArg() for index 2: convertPerlToObjC() failed
**** ERROR **** PerlObjCBridge: sendObjcMessage: Error converting argument 1 for message "setObject:forKey:"
**** ERROR **** PerlObjCBridge: error sending message setObject:forKey: at /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/PerlObjCBridge.pm line 233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment