Thanks for the branch
At first it failed to launch on my mac:
2010-01-06 00:46:47.927 Unofficial Google Wave Notifier[1091:10b] Path
(null) given to -[NSWorkspace iconForFile:] is not a full path.
2010-01-06 00:46:47.961 Unofficial Google Wave Notifier[1091:10b] ***
Assertion failure in -[NSMenuItem
initWithTitle:action:keyEquivalent:],
/SourceCache/AppKit/AppKit-949.54/Menus.subproj/NSMenuItem.m:182
2010-01-06 00:46:47.961 Unofficial Google Wave Notifier[1091:10b] An
uncaught exception was raised
2010-01-06 00:46:47.963 Unofficial Google Wave Notifier[1091:10b]
Invalid parameter not satisfying: aString != nil
2010-01-06 00:46:47.963 Unofficial Google Wave Notifier[1091:10b] ***
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Invalid parameter not
satisfying: aString != nil'
This happen when a browser app doesn't have app icon. MobileSafari.app
of iPhoneSDK is a case.
However I'v done a small fix.
http://github.com/hiroshi/Unofficial-Google-Wave-Notifier/commit/5f0c3534c67f2044ae4bbe622aa1037726239b40#comment_40950
Nice popup menu with icon!
I didn't see the changes of codes well yet, but I'll do.
--
Hiroshi Saito
Let me know if there is anything else i should do or if it's Ok as is
and ready to be pulled into the master in your repo.
B
On Jan 5, 8:13 am, hiroshi saito <hiroshi3...@gmail.com> wrote:
> Brandon,
>
> Thanks for the branch
>
> At first it failed to launch on my mac:
>
> 2010-01-06 00:46:47.927 Unofficial Google Wave Notifier[1091:10b] Path
> (null) given to -[NSWorkspace iconForFile:] is not a full path.
> 2010-01-06 00:46:47.961 Unofficial Google Wave Notifier[1091:10b] ***
> Assertion failure in -[NSMenuItem
> initWithTitle:action:keyEquivalent:],
> /SourceCache/AppKit/AppKit-949.54/Menus.subproj/NSMenuItem.m:182
> 2010-01-06 00:46:47.961 Unofficial Google Wave Notifier[1091:10b] An
> uncaught exception was raised
> 2010-01-06 00:46:47.963 Unofficial Google Wave Notifier[1091:10b]
> Invalid parameter not satisfying: aString != nil
> 2010-01-06 00:46:47.963 Unofficial Google Wave Notifier[1091:10b] ***
> Terminating app due to uncaught exception
> 'NSInternalInconsistencyException', reason: 'Invalid parameter not
> satisfying: aString != nil'
>
> This happen when a browser app doesn't have app icon. MobileSafari.app
> of iPhoneSDK is a case.
>
> However I'v done a small fix.http://github.com/hiroshi/Unofficial-Google-Wave-Notifier/commit/5f0c...
In my popup menu there are two safari. One of them doesn't have icon.
http://dl.dropbox.com/u/348426/browser-select.png
From output of experiments/launch_service_test,
"org.participatoryculture.Democracy" seems to be a same position of
no-icon safari.
$ ./experiments/launch_service_test
2010-01-07 00:39:47.816 launch_service_test[1738:10b] browsers: (
"com.google.Chrome",
"com.apple.safari",
"org.participatoryculture.Democracy",
"org.webkit.nightly.WebKit",
"org.songbirdnest.songbird",
"com.RealNetworks.RealPlayer",
"com.apple.mobilesafari",
"org.mozilla.firefox",
"com.evernote.Evernote"
)
I cannot found the Democracy.app. Maybe I deleted it from disk long ago.
I don't know why the system has inconsistent list...
---
Hiroshi
> Let me know if there is anything else i should do or if it's Ok as is
> and ready to be pulled into the master in your repo.
Give me a time to review the code.
At this moment, I feel uneasy about
SettingsWindowController.m has unnecessary wide scope variables
and
a some of global variables.
--
Hiroshi
On Wed, Jan 6, 2010 at 5:56 AM, Brandon <bmte...@gmail.com> wrote:
Specifically does NSPopUpButton being a public property and
WaveClientBundleIDKey being an extern make you uneasy?
I can remove the property with no issue but i think the NSUserDefaults
keys should be accessible from anywhere, doesn't have to be an extern
though.
B
On Jan 6, 8:04 am, hiroshi saito <hiroshi3...@gmail.com> wrote:
> Brandon,
>
B
On Jan 6, 7:54 am, hiroshi saito <hiroshi3...@gmail.com> wrote:
> Sorry, It made a mistake that the culprit isn't MobileSafari.
>
> In my popup menu there are two safari. One of them doesn't have icon.http://dl.dropbox.com/u/348426/browser-select.png
You know, as a programmer I think global variable are evil. On the
other hand, I learnt that Apple uses extern for constant like
NSStrings (e.g. NSFontAttributeName).
Even if we follow Apple's convention, we should reduce dependencies
against such implementation details. To do that extern declarations
and the variable definition are remove from AppDelegate.m and
SettingsWindowsController.[mh] and add new files like constatns.[hm]
to store and declare global variables and include(import) the header
form rest of them. I think it seems to be an overkill. Instead, how
about using old plain macro?
constants.h:
#define WaveClientBundleIDKey @"WaveClientBundleID"
See http://github.com/hiroshi/Unofficial-Google-Wave-Notifier/commits/alternative-browser-select
As you know, I used NSString literals for keys. They are vulnerable
against typos. I'll refactor them with same strategy.
I'm afraid that this seems to be a trivial topic, but consistency
among the codes is necessary to keep the code is maintainable...
--
Hiroshi
I typically use #define macros in a constants file as well but was
attempting to follow the more Apple convention of the extern. If
macros are your preference, I have no problem with that and will
follow that convention.
Brandon
On Jan 9, 9:36 am, hiroshi saito <hiroshi3...@gmail.com> wrote:
> Brandon,
>
> You know, as a programmer I think global variable are evil. On the
> other hand, I learnt that Apple uses extern for constant like
> NSStrings (e.g. NSFontAttributeName).
>
> Even if we follow Apple's convention, we should reduce dependencies
> against such implementation details. To do that extern declarations
> and the variable definition are remove from AppDelegate.m and
> SettingsWindowsController.[mh] and add new files like constatns.[hm]
> to store and declare global variables and include(import) the header
> form rest of them. I think it seems to be an overkill. Instead, how
> about using old plain macro?
>
> constants.h:
> #define WaveClientBundleIDKey @"WaveClientBundleID"
>
> Seehttp://github.com/hiroshi/Unofficial-Google-Wave-Notifier/commits/alt...
I just wouldn't like to have extern every file. I think extern
declarations in headers and hiding variable definitions strategy is
suitable for frameworks or libraries.
--
Hiroshi
--
==========
齋藤 宏
Hiroshi Saito
hiros...@gmail.com
http://blog.yakitara.com/
http://github.com/hiroshi
http://www.linkedin.com/pub/hiroshi-saito/8/aab/260
I did found that reset button doesn't work for the popup button.
"Path to Ruby" setting uses Cocoa Bindings so that
-[NSUserDefaultController revertToInitialValues:] will work.
Is it possible to use Cocoa Bindings for the popup?
--
Hiroshi