PDA

View Full Version : Adium and Scripting Bridge




GRMrGecko
Jul 3, 2009, 06:51 PM
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
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.
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