• 0

    posted a message on Timer
    For something running every frame draw wouldn't a local be better than indexing 3 to 4 times each call? Something like:

    local frame = CreateFrame('Frame')
    do
       local timer = 0
       frame:SetScript('OnUpdate', function(self, elapsed)
          timer = timer + elapsed
          if timer >= 5 then
             timer = 0
             DoStuff()
          end
       end)
    end
    Posted in: Lua Code Discussion
  • 0

    posted a message on Lua - C++ extern equivalent?
    MyAddonName = setmetatable({ }, { __index = _G })
    setfenv(1, MyAddonName)

    Put that at the start of the first Lua file and also put the second line at the start of all your other Lua files. That causes any non-local variable that you create to become global to your addon. As a side bonus, you cannot accidently make a variable global. To create an actual global variable you would just do something like _G.myVariable = something.
    Posted in: Lua Code Discussion
  • 0

    posted a message on World Map Help
    Not sure if you were going from memory or those code segments were cut-and-paste but you are missing the () at the end of the ClearAllPoints method calls.
    Posted in: AddOn HELP!
  • 0

    posted a message on FuBar2Broker (Unofficial)
    Quote from daf2
    Ideally i'd re-write Fubar_MicroMenu as a LDB but tbh i don't know enough to do it yeat so the stop gap option seems to implement the missing function in Fubar2Broker to make it work, at first glance it seems doable but I kind wanted your opinion before wasting days banging my head against it :)
    Even if that particular function was supported you will just run into more issues with it out of the equation. The next obstacle would be that no current LDB display supports multiple icons for one data feed so no matter what you are stuck creating a seperate launcher for each icon you want implemented.

    Another hurdle is that the character, pvp, and game menu icons are two textures together which is also not currently supported. You could ignore one of the textures for the first two but can't for the game menu icon without losing the latency coloring. This may not be a concern for what you want but I'm mentioning it just in case.
    Posted in: Data Broker AddOns
  • 0

    posted a message on ChocolateBar, do you like chocolate?
    If you go by the spec the discrete components are:

    [icon] [label] [value/suffix or text]

    There are many deviations such as using text instead of label or completely swapping the two. I think the trend is just put what you want where ever and let the display guess what is intended.
    Posted in: Data Broker AddOns
  • 0

    posted a message on LibDataBroker-1.1 not-really-official thread
    DockingStation doesn't enforce anything. Any warning/errors it shows were by user request and are off by default. As for the warning when a 'launcher' uses the text field, the reason that was requested was because when the user selected the option to disable showing labels they were still getting some text next to a couple of their launchers.

    I told them that the launchers were probably just using the text field instead of the label field and that they could just disable the text field for that particular plugin. They insisted that they only wanted to change settings globally and not for individual plugins. Not sure how that makes me the bad guy but what ever.
    Posted in: Data Broker AddOns
  • 0

    posted a message on DockingStation (Display)
    Quote from StormFX
    Don't know if anyone else is experiencing this but occasionally, my tips won't show for items, etc, until I re-mousover DS.
    Is this still happening?

    Quote from StormFX
    Also, can you change the default state to Enabled on Betas/Releases?
    All of my addons are disabled by default.
    Posted in: Data Broker AddOns
  • 0

    posted a message on 3.1.0 the self help thread
    I didn't have access to the PTR so maybe I'm way behind on this but when did GetPlayerFacing() get changed to returning radians instead of degrees?
    Posted in: Lua Code Discussion
  • 0

    posted a message on DockingStation (Display)
    Quote from Adirelle
    could you please output errors that happen in dataobject handlers ?
    The next version I'll set it up so that if you are showing warnings/errors during plugin creation it will also show errors thrown by plugin script handlers.
    Posted in: Data Broker AddOns
  • 0

    posted a message on LibDataBroker-1.1 not-really-official thread
    Quote from Tekkub
    Launchers are not intended to be shown at all times on a data display (titan/etc), it's just an old usecase that people refuse to give up.
    Did I miss a memo? Since when is one person's personal preference now the standard that others are failing to live up to?

    The only reason I like panel style display addons is the ability to group things together and the ease of changing their font, positioning, and size all under one convenient interface. If someone can make a plugin that fits/works in a panel then good on them.

    If you don't like a plugin for whatever reason then don't use it, but stop saying what does or does not belong just because it doesn't fit your particular tastes. I'd rather have the option to not use something than not have that option at all.
    Posted in: Data Broker AddOns
  • 0

    posted a message on CreatFrame
    Just a small correction but if you don't specify a parent then it has no parent. To test just call f:GetParent() and it will return nil. Or you can just toggle the UI off and see that your frame remains since it's not parented to UIParent or one of it's children.
    Posted in: Lua Code Discussion
  • 0

    posted a message on DockingStation (Display)
    Quote from Adirelle
    Vexxilus, could it be possible to have an option to disable mouse interaction with the panels (but not the plugins) ? It could be either integrated in the lock option or an individual option.
    I actually have something like this in the version I'm working on atm. Basically the lock mechanism is a drop-down menu to select what is unlocked with choices of panels, plugins, or both.

    Quote from Adirelle
    Edit: this would be useful when putting something in the holes between left, center and right part. ATM the panels mask anything. In second thought, moving the panels in a lower frame strata when they are locked may achieve the same effect.
    I don't think I understand this part. Currently when dragging a plugin it's strata layer is changed to the highest possible then restored to its original when the dragging stops. Could you maybe explain what's occurring in a different way?
    Posted in: Data Broker AddOns
  • 0

    posted a message on DockingStation (Display)
    Forget what I said, go with Adirelle's suggestion. Now I just need to find a short bus to take to work tomorrow for not thinking of that.
    Posted in: Data Broker AddOns
  • 0

    posted a message on DockingStation (Display)
    The problem is that some of ItemRack's functions were designed around using frame names and getglobal(frameName) instead of just generic frame references. Since Broker_ItemRack is using one of those functions it is checking that all frame references passed also have a name. When DockingStation passes a frame reference its not nil but fails the second part of the check (if self and self:GetName() then ...).

    DockingStation does not name its frames because my opinion is that addons should have a minimal impact on the global namespace. It is just as easy to keep and pass frame references as needed and is generally more efficient. There are cases where frame names are actually important but this isn't one of them.

    Having never used or looked at ItemRack previous to this, it took me less than 20 minutes to download it and Broker_ItemRack and make the necessary code changes to use frame references over frame names with ItemRack.DockWindows and all interacting code.

    ItemRack.lua = 11 lines changed and 1 line removed
    ItemRackButtons.lua = 1 line changed
    Broker_ItemRack.lua = 2 lines changed

    I can provide the changed code snippets if desired.
    Posted in: Data Broker AddOns
  • 0

    posted a message on DockingStation (Display)
    Quote from Seerah
    I would love to see the panels have a name (or at least know of some way to get a table reference for them or something) so that I can add them to my Dash.
    I added two functions: DockingStation:GetNumPanels() and DockingStation:GetPanel(id). Just keep in mind that when panels are deleted the frames are recycled and that all panel ids shift to keep a continous series from 1 to #panels.

    Quote from X-buZZ
    Would it be possible to add (SharedMedia) support for borders to the panels?
    This is in the new version.

    I also added support for the new fields Cladhaire put up.

    On a side note, I still can't reproduce that "width" error from earlier so anyone able to provide a list of addons they use that reliably generate that would help. I also can't reproduce the problem with a pixel row remaining at the top of the screen but my computer sucks so I don't have many resolutions to test with.
    Posted in: Data Broker AddOns
  • To post a comment, please or register a new account.