where is MailServices in TB 60?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

where is MailServices in TB 60?

opto
I think I got it in Components.utils.import("resource:///modules/Services.jsm");
but that doesn't work any longer.

I want to access the tagService:let tagArray = MailServices.tags.getAllTags({});
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

Jörg Knobloch
On 16/12/2018 07:59, opto wrote:
> I think I got it in Components.utils.import("resource:///modules/Services.jsm");
> but that doesn't work any longer.
>
> I want to access the tagService:let tagArray = MailServices.tags.getAllTags({});

You can always use DXR for questions like this one:

https://dxr.mozilla.org/comm-esr60/search?q=services.jsm&redirect=false

https://dxr.mozilla.org/comm-esr60/search?q=mailservices.js&redirect=false

ChromeUtils.import("resource://gre/modules/Services.jsm");

ChromeUtils.import("resource:///modules/mailServices.js");

Whether you use //gre/ or /// *is* important.

Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

opto
Jörg,

many thanks.
This searches for occurances of e.g. mailServices.jsm (e.g. all ChromeUtils.import(...).

Is there a way just to search for the file? Meaning: where it is in the tree?
Trying to do that with windows explorer in my downloaded code takes ages .. (it is an atom processor in my notebook and win 10, so slooooow).

Thanks,

Klaus
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

Onno Ekker-2
If you know the name of the file, in dxe you can search for file:filename. There’s a lot of extra search options you can try.

Also sometimes dxr is lagging or searching is missing results. Then you can try searchfox.org.

Onno

> On 18 Dec 2018, at 07:57, opto <[hidden email]> wrote:
>
> Jörg,
>
> many thanks.
> This searches for occurances of e.g. mailServices.jsm (e.g. all ChromeUtils.import(...).
>
> Is there a way just to search for the file? Meaning: where it is in the tree?
> Trying to do that with windows explorer in my downloaded code takes ages .. (it is an atom processor in my notebook and win 10, so slooooow).
>
> Thanks,
>
> Klaus
> _______________________________________________
> dev-apps-thunderbird mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-apps-thunderbird

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

Jörg Knobloch
On 18/12/2018 08:25, Onno Ekker wrote:
> If you know the name of the file, in dxe you can search forfile:filename. There’s a lot of extra search options you can try.
>
> Also sometimes dxr is lagging or searching is missing results. Then you can try searchfox.org.

Searchfox is not available for comm-esr60 which you need to use:

https://dxr.mozilla.org/comm-esr60/search?q=file%3Amailservices&redirect=false
https://dxr.mozilla.org/comm-esr60/source/mailnews/base/util/mailServices.js

Especially "mailservices" has been renamed.

Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

opto
So is mailServices.jsm what I find as Services.jsm in older Addons?

I have some older Addons importing Both. Maybe someone Tried to adapt already.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

Jörg Knobloch
On 18/12/2018 17:03, opto wrote:
> So is mailServices.jsm what I find as Services.jsm in older Addons?
>
> I have some older Addons importing Both. Maybe someone Tried to adapt already.

No they are entirely different. Services.jsm comes from Mozilla Central,
MailServices comes from Comm Central. They have been renamed from
mailServices.js in TB 60 to MailServices.jsm from TB 65.

Jörg.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

opto
the addon calls for this, which error console does not like:
Components.utils.import("resource:///modules/Services.jsm");

this seems to work: Components.utils.import("resource://gre/modules/Services.jsm");

is it the same file relocated to elsewhere?

The old addon is replymanager, working till ca. TB45. We greatly enhanced it and on the day I wanted to upload it to AMO, it stopped working. I am trying to revive it.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: where is MailServices in TB 60?

Jörg Knobloch
On 18/12/2018 20:17, opto wrote:
> the addon calls for this, which error console does not like:
> Components.utils.import("resource:///modules/Services.jsm");
>
> this seems to work: Components.utils.import("resource://gre/modules/Services.jsm");

No, it never relocated, /// for that file was always wrong, but
tolerated. See my previous post:

On 16/12/2018 09:39, Jörg Knobloch wrote:

> You can always use DXR for questions like this one:
>
> https://dxr.mozilla.org/comm-esr60/search?q=services.jsm&redirect=false
>
> https://dxr.mozilla.org/comm-esr60/search?q=mailservices.js&redirect=false 
>
>
> ChromeUtils.import("resource://gre/modules/Services.jsm");
>
> ChromeUtils.import("resource:///modules/mailServices.js");
>
> Whether you use //gre/ or /// *is* important.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird