[Adium-devl] Plugin: Unable to add method to AIPreferenceController using category
Henrik Nyh
henrik at nyh.se
Thu May 24 16:52:27 UTC 2007
On 24/05/07, George Armah <armahg at gmail.com> wrote:
> I'm also new to Adium / Objective C.
> I know this has already been mentioned but have you checked that your
> Header Search Paths
> setting under Project ->Edit Active Target "Yourpluginname" is correctly
> set?
> This was one of my main problems when starting out.
>
> As a side note I am able to have both
> #import <Adium/AIPreferenceControllerProtocol.h>
> #import "AIPreferenceController.h"
>
> in the file GASendEmailSMSPlugin.m and I get no build errors (my Header
> search paths is ~/adium/Source)
Doesn't this just amount to shorter import statements, though? Is it
different from using an absolute import statement in any other sense?
> Out of curiosity how are you planning to override the
> -userPreferredDownloadFolder method? Are you going to override it (by
> mangling) to
> add an extra "sender" parameter?
I actually haven't thought that through yet; wanted to get the
category stuff working first. I was thinking of getting that info from
Somewhere Outside, though, rather than as an extra parameter.
> >From your description you want the user's download folder to become
> sender-specific, have you considered looking into the
> AIFileTransferControllerProtocol.h and the
> ESFileTransferController class to do the customization of the download
> folder when the file transfer happens?
> It might be worth a try.
I've come up with another solution that's along those lines:
http://henrik.nyh.se/filer/FileTransferFoldersPerSenderPlugin.AdiumPlugin.zip
http://svn.nyh.se/cocoa/FileTransferFoldersPerSenderPlugin/
Basically I just listen for FILE_TRANSFER_BEGAN notifications and
setLocalFilename on the file object in that notification.
Not perfect, but it might suffice.
More information about the devel
mailing list