Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

thunderbird 3.0 extension issue

10 views
Skip to first unread message

iodra

unread,
Jan 26, 2010, 8:05:38 AM1/26/10
to
I’m trying to copy some mail messages in thunderbird 3 rc2 from one
folder to another folder.
My code fails in javascript when I call CopyMessages with the
following message:
[Exception... "Could not convert JavaScript argument arg 1
[nsIMsgFolder.copyMessages]" nsresult: "0x80570009
(NS_ERROR_XPC_BAD_CONVERT_JS)"

My code is as follows:

var consoleService = Components.classes['@mozilla.org/messenger/
messagecopyservice;1'].getService
( Components.interfaces.nsIMsgCopyService );

consoleService.CopyMessages(srcFolder,

messages ,
true,

msgWindow,
null,

false ,

false);

I am quite sure that the first parameter, srcFolder is of type
nsIMsgFolder. Furthermore, when I try to call methods from
nsIMsgFolder on srcFolder it works.
The code works on older versions of thunderbird.

Has anything changed in the definition of CopyMessages in this release
or am I doing something wrong?

Pavol Mišík

unread,
Jan 26, 2010, 9:23:33 AM1/26/10
to
iodra wrote:
> I�m trying to copy some mail messages in thunderbird 3 rc2 from one
Tb2.0.0.21:

void CopyMessages(in nsIMsgFolder srcFolder,
in nsISupportsArray messages,
in nsIMsgFolder dstFolder,
in boolean isMove,
in nsIMsgCopyServiceListener listener,
in nsIMsgWindow msgWindow,
in boolean allowUndo);

Tb3.0.0:
/**
* Copies or moves existing messages from source folder to destination
folder.
*
* @param srcFolder Source folder of an operation.
* @param messages The array of nsIMsgHdrs in source folder which
will be moved/copied.
* @param dstFolder Destination folder of operation.
* @param isMove false for copy operation, true for move operation.
* @param listener Listener which receive operation notifications
* @param msgWindow Window for notification callbacks, can be null.
* @param allowUndo Specifies if this operation will be done as an
transaction
* that can be undone.
*/
void CopyMessages(in nsIMsgFolder srcFolder,
in nsIArray messages,
in nsIMsgFolder dstFolder,
in boolean isMove,
in nsIMsgCopyServiceListener listener,
in nsIMsgWindow msgWindow,
in boolean allowUndo);

nsISupportsArray has been changed to nsIArray.

BTW: mozilla.dev.apps.thunderbird is more appropriate newsgroup for this.

PM-

0 new messages