mono - NSUserNotificationCenterDelegate methods not called on only one machine -
i'm trying use nsusernotificationcenter. i'm able deliver notifications successfully. i'm using shouldpresentnotification callback on nsusernotificationcenterdelegate present notifications, when app running in foreground.
this works great, except on 1 of machines!
i have stripped code down it's basic example. machines running 10.8.3 , mono 2.10.12. on 2008 macbook pro , colleague's 2012 rmbp, works excepted. however, on identical 2012 rmbp notification not presented if app in foreground. in fact, on machine, , machine only, none of nsusernotificationcenterdelegate methods invoked.
note notification still delivered on machine - notification works - doesn't presented when app in foreground (because delegate methods never invoked).
i appreciate if has insight on settings or configuration might causes behaviour, or if there mechanism can use debug behaviour.
here code:
uncshouldpresentnotification shouldpresent = (a, b) => { return true; }; // shared initialization code void initialize() { nsusernotificationcenter.defaultusernotificationcenter.shouldpresentnotification = this.shouldpresent; } partial void notify(nsobject sender) { donotify(); } [export("donotify")] private void donotify() { nsusernotification notification = new nsusernotification(); notification.title = notificationtext.stringvalue; nsusernotificationcenter.defaultusernotificationcenter.delivernotification(notification); }
ok had same bug. firstly contacted xamarin , they've fixed in recent code. secondly due overriding both delegate delegate (great name know) , shouldpresent setting. if want override shouldpresent setting, in nsusernotificationcenter.delegate instead.
i hope that's clear. we've resolved bugzille entry @ https://bugzilla.xamarin.com/show_bug.cgi?id=11456
Comments
Post a Comment