• 0

    posted a message on Extending/Manipulating existing Addons?
    thanks guys, u helped me alot ;)

    ya i know that lua isnt an oo language XD its just a pseudocode example to show what i mean and i think posting a inheritance example was the best way to express my problem...

    so as far as i understood what u said, i can use all functions and variables of an addon from outside as long as they're global (can there be local functions?).

    Another question: What happens if i name my addon and the functions like another addon is named? How does the wow interpreter know which function to call if there're several functions with the same name and arguments?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Extending/Manipulating existing Addons?
    hmm, sry i expressed myself unclear. Heres the next attempt XD

    i'm talkin/askin about the possibilities of the programming language lua in the wow environment (interpreter)...

    Most OO programming languages have the possibility to extend existing "Classes" without having to change their code, moreover the possibility to overide methods of the "Class" extended.

    For Example (Pseudocode):

    class Person
    {
     var Name;
     var Age;
    
     method Print()
     {
      System.Print(Name);
      System.Print(Age);
     }
    }
    
    class Customer extends Person
    {
     var Number;
    
     method override Print()
     {
      base.Print();
      System.Print(Number);
     }
    }


    This Call:

    var TestCustomer = new Customer();
    TestCustomer.Name = "Peter";
    TestCustomer.Age = 36;
    TestCustomer.Number = 1593201
    TestCustomer.Print();


    Would print this information:
    Peter
    36
    1593201

    In my example Person could be ClassTimer and Customer could be the addon i would write...

    so my question is: Does lua have the possibility to extend/manipulate existing code without having to change the existing code? (Maybe its limited by visibility)

    Either its possible for all addons, or its not possible for any addon!

    Thanks in advance, Regards
    Posted in: Lua Code Discussion
  • 0

    posted a message on Extending/Manipulating existing Addons?
    no, thats not the point. I'm askin for the posibility and if its posibile if someone has some information for me (ClassTimer was JUST an example)...

    ot: I don't know any cooldown/buff/debuff addon which tracks player/target/focus in seperated frames and is getting maintained regulary
    Posted in: Lua Code Discussion
  • 0

    posted a message on Extending/Manipulating existing Addons?
    Hello there,

    i've got a simple question about the posibilities of lua in the wow environment:

    Is it possible to extend an existing addon, without modifying the addons code?

    For example u've got an addon like ClassTimer (Tracking of player's/target's/focus's buff/debuff durations) and u want to extend this addon to track cooldowns too. I think of makin an addon named ClassTimerExtension, where i manipulate ClassTimers functions to display cooldowns.

    I didn't find usefull stuff about extending existing addons (maybe cause its not possible), so if u've got usefull information or links i would be pleased if u post them...

    Regards
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.