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 <ba...@us.netrek.org>
Key fingerprint = 9906 320A 8BB6 64AD 96A7 7785 CBFB 10BF 568B F98C