Adium Plugin assistance

Evan D. Schoenberg, M.D. evan at adium.im
Mon Nov 26 01:36:24 UTC 2012


Bob, 

1. Make sure that your AIService subclass references your AIAccountViewController subclass, e.g.
- (AIAccountViewController *)accountViewController{
    return [AINetrekAccountViewController accountViewController];
}

2. In your .xib file, make the FIle's Owner class your custom subclass (AINetrekAccountViewController) and connect its view_* outlets to the appropriate views, e.g. view_options to the options view.

Any view you don't connect will get the default Adium one unless you force it to nil in AINetrekAccountViewController. e.g. if you wanted to ensure no privacy view was shown, you could add there:
 
- (NSView *)privacyView
{
    return nil;
}


Does that get it working for you?

Cheers,
Evan



On Sunday, November 25, 2012 at 5:36 PM, Bob Tanner wrote:

> On 2012-11-20 23:10:47 +0000, Bob Tanner said:
> 
> > 
> > > Followed http://trac.adium.im/wiki/CreatingPlugins to get a bare bones 
> > > plugin compiled.
> > > 
> > 
> > 
> > Making progress. I started working a top-down approach.
> 
> I'm having trouble understanding how the Account tab can be customized 
> for my plugin.
> 
> Looking at several of the plugins inside the Adium source tree it looks 
> like you create a AccountViewController class.
> 
> Override the following methods:
> 
> - (NSString *)nibName
> - (void)awakeFromNib
> -(void)configureForAccount:(AIAccount *)inAccount
> - (void)saveConfiguration
> 
> I've done this but when I go to create an account with my plugin I get 
> the standard Account view (which I assume is the view provided by 
> AIAccountViewController).
> 
> I've looked at the Twitter, Bonjour, and IRC plugins and this is what 
> it looks like they are doing but I must be missing something.
> 
> AINetrekAccountViewController.h
> 
> #import <Adium/AIAccountViewController.h>
> 
> @interface AINetrekAccountViewController : AIAccountViewController
> {
> __weak NSTextField *_textField_userName;
> __weak NSTextField *_textfield_server;
> __weak NSTextField *_textField_port;
> }
> 
> @property (weak) IBOutlet NSTextField *textField_userName;
> @property (weak) IBOutlet NSTextField *textfield_server;
> @property (weak) IBOutlet NSTextField *textField_port;
> 
> @end
> 
> AINetrekAccontViewController.m
> 
> #import "AINetrekAccountViewController.h"
> #import "AINetrekAccount.h"
> 
> @implementation AINetrekAccountViewController
> 
> - (NSString *)nibName
> {
> return @"AINetrekAccountView";
> }
> 
> - (void)awakeFromNib
> {
> [super awakeFromNib];
> 
> }
> 
> -(void)configureForAccount:(AIAccount *)inAccount
> {
> [super configureForAccount:inAccount];
> }
> 
> - (void)saveConfiguration
> {
> [super saveConfiguration];
> }
> 
> My account view is inside the AINetrekAccountView.xib.
> 
> What am I missing to get my account view to be displayed?
> 
> Thanks.
> 
> -- 
> Bob Tanner <basic at us.netrek.org (mailto:basic at us.netrek.org)> 
> Key fingerprint = 9906 320A 8BB6 64AD 96A7 7785 CBFB 10BF 568B F98C
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20121125/b4147cf9/attachment-0002.html>


More information about the devel mailing list