Event for when MM ready?

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

DaledeSilva
Posts: 906
Joined: Sun May 28, 2006 4:22 am
Location: Australia
Contact:

Event for when MM ready?

Post by DaledeSilva »

I found in this documentation that I can use window.whenReady(callback) to know when MM and all scripts are loaded, however, I'm trying to attack some app.listener events and I'm getting errors

Code: Select all

mminit.js:2558 Uncaught Error: addEventListener function not found! Event change
at Object.app.listen (mminit.js:2558:26)
Is there another event I can hook into to know when it's safe to start setting up my script?

Thanks :)
Dale.
Product Designer & Indie Developer.
Building at the intersection of motion, art, and code.
Find me on twitter and all the other ones here.
PetrCBR
Posts: 1767
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Re: Event for when MM ready?

Post by PetrCBR »

Show me whenReady code and what object you've added to app.listen ?
How to make a debuglog - step 4b: viewtopic.php?f=30&t=86643
Ludek
Posts: 5021
Joined: Fri Mar 09, 2007 9:00 am

Re: Event for when MM ready?

Post by Ludek »

Watching code in maincontent.js and there is rather:

Code: Select all

whenReady(function () {
    if (!builtInMenu) {
        app.listen(window.thisWindow, 'scriptsLoaded', () => {
            uitools.refreshMenu();
        });
    }
So probably the 'scriptsLoaded' event is the event that you are looking for?
Post Reply