Giter Site home page Giter Site logo

Comments (7)

cont1nuity avatar cont1nuity commented on August 15, 2024 1

Thank you fort testing. If you find any issues, please let me know.

from plater-nameplates.

Arcitec avatar Arcitec commented on August 15, 2024

This is related to the "Mod Destructor's modTable is nil" bug:

#104

Proposed Plater algorithm when a mod becomes disabled:

  1. Trigger destructors for all visible frames, with modTable provided. (This improvement is described in #104.)
  2. Trigger uninitialization script for the mod, with modTable provided.
  3. Finally, Plater erases/forgets the modTable and disables the mod.

from plater-nameplates.

cont1nuity avatar cont1nuity commented on August 15, 2024

Agreed, makes sense.

from plater-nameplates.

cont1nuity avatar cont1nuity commented on August 15, 2024

Please test against the next alpha version.

from plater-nameplates.

Arcitec avatar Arcitec commented on August 15, 2024

@cont1nuity Thank you so much. I am testing the Deinitialization script now and it's working perfectly. It receives the modTable and I'm able to unhook from the 3rd party addon in there, I love it so much! ;-)

from plater-nameplates.

Arcitec avatar Arcitec commented on August 15, 2024

I will continue testing as I port my mod to these new functions. But it seems perfect!

from plater-nameplates.

Arcitec avatar Arcitec commented on August 15, 2024

@cont1nuity Still testing, and everything still seems perfect!

I forgot to say that this message seems a bit unclear:

["Deinitialization"] = "Executed once for the mod when it is unloaded. Used to de-initialize the global mod environment 'modTable' and the mod for the last time.",

It makes it sound like deinitialization only runs once, ever. And that it only runs when the mod is being unloaded for the last time.

From what I can see, it always runs every time the mod is unloaded (whether automatically via load-conditions or manually unloaded).

I notice, however, that the "execute once" language is used in initializer too: ["Initialization"] = "Executed once for the mod when it is compiled. Used to initialize the global mod environment 'modTable'.",

Similarly confusing language is used for the Constructor: ["Constructor"] = "Executed once when the nameplate run the hook for the first time.\n\nUse to initialize configs in the environment.\n\nAlways receive unitFrame in 'self' parameter.",


Perhaps something like this is clearer then?

["Initialization"] = "Executed once for the mod every time it is compiled (loaded). Used to initialize the global mod environment 'modTable'.",

["Deinitialization"] = "Executed once for the mod every time it is unloaded. Used to de-initialize the global mod environment 'modTable' and the mod.",

["Constructor"] = "Executed once when the nameplate runs the hook for the first time after every initialization.\n\nUse to initialize configs in the environment.\n\nAlways receives unitFrame in 'self' parameter.",

As a programmer reading the docs, those descriptions would be a lot clearer. I've had to do a lot of manual testing prior to this too, until I figured out when the different hooks run. I even made my own mod-code-comments docs for every event just because it was so confusing (which you can see an example of over here). 😄 So if the descriptions can become a bit clearer, that would be a win. Right now I feel like they're a bit misleading depending on how people reads things like "executed once" and "for the last time".

from plater-nameplates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.