Adium Plugins

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
ElCrazon
Harmless
Posts: 7
Joined: Sun Jan 16, 2005 10:16 pm

Adium Plugins

Post by ElCrazon »

I'm not sure that this is the right place to post this, if there's some sort of developer mailing list please point me in that direction.

Anyway, I'm trying to make a new Adium Account Plugin. I'm basing my work off the Rendezvous Plugin as it doesn't have the multiple latyers of inheritance that the Gaim based services have. Right now I'm working on the Account View settings. The problem that I'm having is with this function in my Service source file:

Code: Select all

- (AIAccountViewController *)accountView{
    return([IHSIPAccountViewController accountView]);
}
When I do that the Adium crashes on launch with this logged to the console:

Code: Select all

2005-01-16 12:32:43.186 Adium[2747] *** +[IHSIPAccountViewController newInstanceOfPlugin]: selector not recognized
2005-01-16 12:32:43.187 Adium[2747] NSExceptionHandler has recorded the following exception:
NSInvalidArgumentException -- *** +[IHSIPAccountViewController newInstanceOfPlugin]: selector not recognized
Stack trace:  0x8dcb1f58  0x00086c2c  0x90a5c624  0x909fcee8  0x90836810  0x00085728  0x0008551c  0x00022dac  0x909f7184  0x901aa5c0  0x901aefd0  0x909f4fd0  0x92ee3e70  0x92ee3d5c  0x92ee3f8c  0x90a4a544  0x90a50c6c  0x91674a10  0x91677858  0x91674c50  0x928c4338  0x92dd301c  0x92de98c8  0x92dfdc30  0x92eba2b8  0x0000a57c  0x8fe1a558  0xbfffff18
2005-01-16 12:32:44.034 Adium[2747] Launching the Adium Crash Reporter because an exception of type NSInvalidArgumentException occurred:
*** +[IHSIPAccountViewController newInstanceOfPlugin]: selector not recognized
But when I return nil in the finction it loads but of doesn't pick up on the new account type. Does anyone have any idea what is causing this to happen?
User avatar
bgannin
Growl Team
Posts: 1817
Joined: Thu Dec 02, 2004 8:11 am
Location: ..here
Contact:

Post by bgannin »

Why are you returning the [objectController accountView] when you are stating in the method signature you are returning ObjectController (you can see the names, I shorthanded to save some typing)
Try my software!

#define ADIUMX pimp //by me
#define QUESTION ((2b) || (!2b))
Have you hugged a programmer today?
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

When Adium loads a plugin, it messages the bundle's main class with newInstanceOfPlugin; the bundle's main class should be a class inheriting from AIPlugin.

So possible problems here:

1) Check your inheritance.

2) Check the class listed as the "Main Class" in the info for your target in xcode. Make sure it's your plugin class, not IHSIPAccountViewController or blank.

The developers' list is adium-devl@lists.sourceforge.net. You can subscribe and subsequently post to it via:
http://lists.sourceforge.net/lists/listinfo/adium-devl

You can find this and the others listed under Lists on Adium's sourceforge page.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
User avatar
Adam Iser
Crema
Posts: 427
Joined: Thu Dec 02, 2004 1:36 am

Post by Adam Iser »

I vote #2 as the most probable issue :D
ElCrazon
Harmless
Posts: 7
Joined: Sun Jan 16, 2005 10:16 pm

Post by ElCrazon »

No, the "Principal Class" of the target is set to IHSIPPlugin. I am not defining newInstanceOfPlugin, however as I assume it will just use AIPlugin's method.

As for the section of code that seems to be causing the problem, the signature is the same for all of the services classes in the Gaim plugin set, so I assumed that was the way it should be as my account view controller is derived from the stadard one.
ElCrazon
Harmless
Posts: 7
Joined: Sun Jan 16, 2005 10:16 pm

Post by ElCrazon »

Ok, well. I got it. I was being stupid and not making the function exactly the same as it was in the other services. Anyway, now it shows up in the account window. However, I cannot for the life of me figure out how to get it's icon to work. Is there some special string I have to change for it to fin the serivce icon. They're being bundled into the Plugin, and I'm using the Rendezvous ones to test right now.
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

ElCrazon wrote:Ok, well. I got it. I was being stupid and not making the function exactly the same as it was in the other services. Anyway, now it shows up in the account window. However, I cannot for the life of me figure out how to get it's icon to work. Is there some special string I have to change for it to fin the serivce icon. They're being bundled into the Plugin, and I'm using the Rendezvous ones to test right now.
Glad you got it working.

Right now the icons are pretty much hardcoded for just the services built into Adium. Another third party protocol plugin ran into the same problem and hacked around it... I'll take a look later this week at allowing services to specify a 'default' image to use if the service icon pack doesn't supply one, which will solve the problem as you'll be able to specify one without making coreside Adium changes.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
Post Reply