Dear Peter, thank you for your quick and very specific help. I must
have been blind or happy to have made Growl work so easily (the
registration ticket method) and didn't consider digging to the .h
files (out of respect to the developers' work perhaps, or just not
being "nosy" in nature).

As I said, I am an in-experienced programmer... So for anyone checking
this in the future, here is the new/proper (and much simpler!)
approach to the problem:

+(void)initialize
{
        // Growl is NOT installed
        if ([GrowlApplicationBridge isGrowlInstalled] == NO)
        {
                NSAlert *warnCalendar = [NSAlert alertWithMessageText:
[[NSRunningApplication currentApplication] localizedName]
defaultButton: @"Exit" alternateButton: nil otherButton: nil:
informativeTextWithFormat: @""];
                [warnCalendar setAlertStyle:NSCriticalAlertStyle];
                [warnCalendar setInformativeText: @"Growl framework was not 
found
on
your system! Please install Growl frist from www.growl.info!"];

                // Display warning then terminate application
                [warnCalendar runModal];
                [NSApp terminate:self];
        }
        // Growl is apparently installed
        else if ([GrowlApplicationBridge isGrowlInstalled] == YES)
        {
                NSLog(@"System reports that Growl is installed.");
        }
}


At least, in my old code, I learned how to check for files :-)


Peter, one last question, please. What should come first, in Xcode app
execution sequence? The check whether Growl was loaded by the
application, or calling Growl's own function to check for system
installation?

Is (void)initialize a good place to do the check, or do you suggest
(void)awakeFromNib instead?

I cannot see it clearly... if Growl was not loaded by the application
(as per [growlBundle load] code sample in the developers
documentation) can it still execute [GrowlApplicationBridge
isGrowlInstalled] ?


Many thanks.
Konstantinos



On Mar 2, 6:31 pm, Peter Hosey <[email protected]> wrote:
> On Mar 2, 2011, at 08:28:37, Konstantinos wrote:
>
> > What is *not* mentioned, is how to check a system-wide installation of 
> > Growl.
>
> This is documented in the GrowlApplicationBridge header.

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