Adium and Scripting Bridge

Discussion in 'Mac Programming' started by GRMrGecko, Jul 3, 2009.

  1. macrumors member

    GRMrGecko

    Joined:
    Jun 7, 2008
    Location:
    Nowhere and everywhere
    #1
    Hello, I'm trying to change the status message of Adium using the Scripting Brige and am having no luck.

    It always crashes and has this message
    Code:
    2009-07-03 18:46:03.437 Adium Status[25959:10b] An uncaught exception was raised
    2009-07-03 18:46:03.440 Adium Status[25959:10b] *** -[SBProxyByClass setTitle:]: object has not been added to a container yet; selector not recognized [self = 0x1eaaa0]
    2009-07-03 18:46:03.441 Adium Status[25959:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[SBProxyByClass setTitle:]: object has not been added to a container yet; selector not recognized [self = 0x1eaaa0]'
    My code is.
    Code:
    AdiumApplication *adium = [[SBApplication applicationWithBundleIdentifier:@"com.adiumX.adiumX"] retain];
    AdiumStatus *status = [[[[adium classForScriptingClass:@"status"] alloc] init] autorelease];
    [status setTitle:@"Some Title"];
    [status setStatusType:AdiumStatusTypesAvailable];
    [status setSaved:NO];
    [adium setGlobalStatus:status];
    Thanks for any tips,
    Mr. Gecko
     

Share This Page