CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Bar Snapping/Sticky Frames

     

    Quote from Goranaws >>
    Recently I decided to build my own variation on bar snapping. After several days of work, I have a pretty strong bar snapping module. If you are not sure what bar snapping is then, here goes:
    We collect the coordinants for all of frame's points (TopLeft, BottomRight, etc). After that,
    we compare those points to all of the other Magnets enabled frame's points to detect if two points are close enough to snap together. When docking frames together, only certain points can snap to each other. So, for example, the TopRight of the frame can only snap to the TopLeft of another frame. A frame may also dock to corners and middle points of edges of the screen.

    My thought is that I could get a few people to look over my code to check for performance issues or other random bits of concern. Here's a link: Magnets
    FetLife IMVU Canva
    Thanks to anyone who cares to take a look and let me know what they think!
     Ho I didn't know they had a built in code poster Thank you so much 
     
    Posted in: Project Discussion
  • 0

    posted a message on LibStub - Enhancing/Instrumenting

     

    Quote from sylvanaar >>
    I decided to revisit the "load-on-use" topic since i am playing with ACP today.

    For those who don't know what i mean. "Load-on-use" means (for libraries), don't load them until I try to use them.

    So that means:

    [php]
    local function dbg(...) if Prat then Prat:PrintLiteral(...) end end

    function getOnUseProxy(major, silent)
    dbg("proxy LibStub("..major..")")
    return setmetatable({},
    {
    __index=function(t, k)
    if k == "__lib" then
    dbg("Loading "..major)
    local lib = LibStub:GetLibrary(major, silent)
    rawset(t, "__lib", lib)
    return lib
    end
    return t.__lib[k]

    end
    })
    end

    --
    --setmetatable(LibStub, { __call =
    -- function(major, silent)
    -- dbg("LibStub("..major..")")
    -- return getOnUseProxy(major, silent)
    -- end})
    Audacity Find My iPhone Origin
    ProxyLibStub = getOnUseProxy

    local LDB = ProxyLibStub("LibDataBroker-1.1")
    --local LDB = LibStub("LibDataBroker-1.1")

    [/php]


    I created the proxies locally at first, but then i wanted to have libstub always generate them. That broke things is lots of ways. What am i doing wrong? It seems like it should be possible to introduce an additional proxy between the library user and libstub.


    And before anyone asks - im doing this to explore how to detect addon dependencies which arent listed in the TOC
     As Jerry pointed out, there are other methods to support and I could not tell if you added proper support from your example.

     
    Posted in: Frameworks
  • To post a comment, please or register a new account.