• 0

    posted a message on StarTip - official thread
    Quote from starlon
    I'm not sure why this happens, but every so often you have to add some whitespace to the text and it'll fix some problems. I'm not sure exactly where you're having a problem, though, so if you clarify a bit more, maybe I can better help you.




    I think tooltip:AddLine has an option to wrap the text, but other than that I'm not sure I know a way to do what you want. Maybe I should look into a way of providing options so users can specify line wrapping?


    I know this is rather old but it's a limit of the Colorize function:
    LibScriptablePluginColor-1.0.lua - line 206
    local function Colorize(str, r, g, b)
    	if type(str) ~= "string" then return "" end
    	if type(r) ~= "number" then r = 1 end
    	if type(g) ~= "number" then g = 1 end
    	if type(b) ~= "number" then b = 1 end
    				-- V space here should be removed
    	return ("|cff%02x%02x%02x%s |r"):format(r * 255, g * 255, b * 255, str)
    end

    result is |cffrrggbbTEXT |r
    Result of Colorize("MyText", 1,0,0) .. "is here";
    Would be MyText is here
    Posted in: General AddOns
  • 0

    posted a message on StarTip - official thread
    *EDIT*
    OK figured it out, the columns need to be increased manually, I was under the impression that this was automatically determined based on the length of the output text.

    Noticing that my lines are being truncated, any clues as to why?
    Tested with word wrap both on and off, as well reloaded the UI to ensure setting

    Version: v1.4.19b



    Am trying to add a colorized single line:

    local r, g, b = DifficultyColor(unit)
    local classification = Classification(unit)
    local form = DruidForm(unit)
    local race = SmartRace(unit)
    local lvl = Level(unit)
    local str = ""
    local uType, uLvl, uForm, uRace, uClass = "","","","",""
    if lvl then
       uLvl = Colorize(tostring(lvl), r,g,b)
    end
    if classification then
        local c = classification
        local cr, cg, cb = DifficultyColor(unit)
        if c == "Elite" then
           cr, cg, cb = 1,1,0
        elseif c == "Rare" or c == "Rare-Elite" then
          cr, cg, cb = 1,0,1
        elseif c == "Boss" then
          cr, cg, cb = 1,0,0
        end
       uType =  Colorize(classification, cr, cg, cb)
    end
    if form then
        uForm = " (" .. form .. ")"
    end
    if race then
        uRace =  race
    end
    if UnitIsPlayer(unit) or (not UnitIsFriend(unit,"player") and not IsPet(unit)) then
       local ucr, ucg, ucb = ClassColor(unit)
       uClass = " " .. Colorize(Class(unit), ucr, ucg, ucb)
    end
    return uLvl .. uType .. uRace .. uClass .. uForm



    *Note*
    The below tests fine, the line became wrapped as opposed to truncated.
    /script GameTooltip:AddLine("This is one really long line that shouldnt be truncated but prolly will be, lets see how LOOOOOOONG it Can GO", 1, 1, 1, 1); GameTooltip:Show();

    with 0 for wrap the line just expanded the tooltip box
    Posted in: General AddOns
  • 0

    posted a message on LibResComm-1.0
    You still have encoding issues

    please see my tickets:
    http://www.wowace.com/addons/librescomm-1-0/tickets/

    I posted fixes since r68
    http://www.wowace.com/addons/librescomm-1-0/tickets/9-r68-v70-localization-drycode-errors/

    Gave explanations and links to the LUA manual to help.
    Posted in: Libraries
  • 0

    posted a message on IterateAddons - addon returns table
    Quote from kagaro
    local AceDB = LibStub:GetLibrary("AceDB-3.0",true)
    if AceDB then -- go really check someone has some
    for db in pairs(AceDB.db_registry) do
    --db.sv saved variablre name
    end
    end


    this is what I use in reflux to swap profiles.


    I can switch profiles fine, but being able to tie them to an entity for later use with out the original savedvariables/*.lua.
    Instead, my profiler is going to copy the current profile to be included and loaded based on a set criteria for it's own profile/s
    EG: If warlock: load these settings/addons, otherwise, load these.

    I wish the curse packager would just create a shadow entry for sv's and optdeps'. X-SavedVariables (you get the idea)

    Wish it disembedded too, but meh.

    That is why only using the table returned from IterateAddons is the proper solution.

    So make an exception for those I come across issues iterating through "addon" with vs making a universal solution?
    Posted in: AddOn HELP!
  • 0

    posted a message on Quartz config
    Quote from siccc
    Im looking a way to make quartz shows only my curses on my target ... nothing else ( i dont wanna see my mind flay or odder ppl debuffs) and also i wanna make a bar that shows me duration of dispresion ? any1 ?


    There isn't a filter for Quartz buffs/debuffs, other than enable/disable
    You shouldn't see other peoples buffs/debuffs timers only yours.
    Dispersion should appear when you enable Buff

    So do /quartz
    Enable Buffs, (self buff timers)
    Unbranch buffs, Enable Target
    In Buffs->Target (target self only buffs/debuffs timers)
    enable Debuffs and enable Buffs
    Posted in: AddOn HELP!
  • 0

    posted a message on IterateAddons - addon returns table
    Quote from OrionShock
    for db in pairs(AceDB.db_registry) do
    	for k,v in pairs(_G) do 
    		if v == db.sv then
    			print("Addon's SV Name:", k)
    			-- "db" here is the AceDB Object being use by the addon
    			--"v" here is the SV Global table
    			--"k" here is the Name of the SV that you can use to cross reference with the .toc file.
    		end
    	end
    end
    


    Eh, All you have to do is pair though the registry and find the global table. All Name-spaces are held on the same SV and are accessible though it.


    That'll work for the actual saving of the info, but what of the display to the end user for selecting addons to save current profile info for?
    In other words believe they would see myAddonDB vs myAddon.
    Currently I'm pulling the AceDB namespaces as well so I can treat them as a separate entity for addons that utilize them. Which is why I was iterating addons. It's overkill I agree, but was trying to cater to the less knowledgeable as well.
    As well believe when I tried that, some addons would turn up a table value instead of a string for the sv name (k), and noticed a huge impact in game for calling _G for each addon vs _G[name]
    Posted in: AddOn HELP!
  • 0

    posted a message on IterateAddons - addon returns table
    Quote from Xinhuan
    If Prat is the only culprit, you should probably just make an exception for it, because the code does look horrible and convoluted.


    TBH Prat is one of a few, but since 3.3 the option for namespacing may come into play more so in Ace3 addons, so in order to support it I have to leave it like it is. Just Prat is widely used, I had originally done if name == "Prat" then, but found a couple others.

    TBH, i think that this method is rather hack. I vote for updating aceDB to support 3rd party exporting and importing of profiles.

    Very much a hack, and easily fixed with 1 line of code, vs me traversing through global table, the aceDB registry and iterating through addons just to find out which addon's savedvariables I'm looking at.
    Posted in: AddOn HELP!
  • 0

    posted a message on IterateAddons - addon returns table
    Quote from Arrowmaster
    What The Fuck.

    Why are you trying to use '_G[name]' and falling back to 'addon'? Just use 'addon'.
    Why are you doing pairs over 'globalTable' and then looking at the key from 'globalTable' in 'addon'?
    Why are you using 'addon[key]' instead of just directly using 'value'?



    Why are you trying to use '_G[name]' and falling back to 'addon'? Just use 'addon'.
    Because addon authors write their addons differently, some rely on Ace to setup their addon while others create their addon with in their own table.
    EG: Prat.NameSpace which I can not iterate though in pairs.

    Why are you doing pairs over 'globalTable' and then looking at the key from 'globalTable' in 'addon'?
    For addons similar to Prat they have several aspects for their Addon's table, one in which has the SavedVariables.
    eg Prat.MyFunction
    The way I'm iterating through it supports both, and doesn't seem to have a major impact in game. I would rather iterate through the AceDB, but I need a reference to apply it after the table info is copied. Rock and Ace2 don't use this at all.

    Why are you using 'addon[key]' instead of just directly using 'value'?
    Because I'm going outside of the globalTable and referring to addon, which again with addons like Prat does exist, but unable to iterate through "addon" in pairs. Using globalTable as a failsafe, to verify that the Ace3 addon does in-fact have an aceDB, since I can't just do addon.db

    Open to suggestions to improve it though, thats' just what i used to get something/anything working.
    The code will be cleaned up for release.

    All in all was trying to bring out result of
    AddonName, SavedVariables Table
    Posted in: AddOn HELP!
  • 0

    posted a message on Blocked addons in WoW?
    Quote from cremor
    How does the protection of PickupInventoryItem affect these Addons? PickupInventoryItem is only for Inventory (worn items).
    Or did they also protect PickupContainerItem/PickupItem?

    I was referring mainly about the other PickUps, not just InventoryItem.
    Hence the below inquiry of the others, but it appears that the new PTR release unprotected it again, so who knows.
    Was for the most part preparing for the worst and Bliz protecting all of the PickUp* due to their standpoint of UI not AI.

    I'm not familiar enough with the API to realize that Inventory meant equipped items versus carried items.

    PickUp API
    Posted in: General Chat
  • 0

    posted a message on Blocked addons in WoW?
    if they kill the ability to PickupItem("Hearthstone") they should provide alternatives to allow proper functionality. Like DestroyItem("itemName", blnShowQualityConfirm), but I could see how that could be abused as well.
    Equipment Manager for one aspect is fine.
    But as far as addons like ShardAce, GarbageFu, or even generic macros, seems like a very heavy way to try to circumvent something that a macro can overcome much like decursive has.

    /equipslot InvSlot item
    All the addon would need to do is make a macro and then just /click it when needed.

    Also what about the other pickups?
    PickupMacro()
    PickupSpell()
    etc?
    Posted in: General Chat
  • 0

    posted a message on Using AceHook (or anything) to hook a function from another addon
    Quote from egingell
    Well, duh. Put your code where it says "do stuff". You shouldn't expect people to write your code for you.


    Seriously?? Awe come one pweeze? :'(

    I use svn fine for my setup with merging/updating.
    Changed a few addons TOCs to include optional deps for disemebbeded, and delete/ignore the libs folder.
    Which helps me to control my compilation with wife/friend. but as for making an addon work the way I want, or change functionality, I wrote an addon that I can throw it all into.
    Such as disabling minimap buttons, saving/loading positions of some frames that several addons missed, managing profiles of many addons, sharing macros.
    That way if a major change happens like with BigWigs I don't have to spend an hour trying to figure out where exactly something went wrong. I can just comment out the line in my own addon, if I didn't include error control.
    Or if I decide to switch addons, I don't accidentally lose the changes I made through the migration process. (I usually rename the original to _AddonName, but ya)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Name of the default cast bar?
    Quote from Phanx
    It's CastingBarFrame.

    Generally speaking, if you don't know the name of a Blizzard frame, you can just look in Blizzard's UI code. You can also look in other addons that affect the frame you're looking for.


    As well in 3.2 they added a neat little ability /fstack or /framestack which will show you a frame and it's children on mouseover.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hide unit name while casting.
    Quote from Phanx
    Well, I have no idea what context your code appears in, but this should give you an idea:

    if [URL="http://www.wowwiki.com/API_UnitCastingInfo"]UnitCastingInfo[/URL](unit) then
        return ""
    else
        return UnitName(unit)
    end



    if [URL="http://www.wowwiki.com/API_UnitCastingInfo"]UnitCastingInfo[/URL](unit) or [URL="http://wowprogramming.com/docs/api/UnitChannelInfo"]UnitChannelInfo[/URL](unit) then
        return ""
    else
        return UnitName(unit)
    end
    

    For spells like penance/mind flay etc
    Posted in: Lua Code Discussion
  • 0

    posted a message on Table Key function
    Quote from Shadowed
    Wait what.

    Are you using pcall or are you just using a function call?


    Allowing the advanced user to supply a snippet of code to do what they like, such as a reference to criteria for loading a savedvariable:
    myVar = function() if addon:IsLoaded() then return "myProfileKey" else return "notmyProfileKey" end end

    Then be able to call for it in their key.
    EG: SavedVariable.Profiles[myVar()]

    But looking at it now, just going to rely on the user to error check their own code.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Looking For Fubar Addon
    For writing your own fubar addon, i'd suggest sticking with LDB (libdatabroker) bottom of the page for API documentation, and using Broker2Fu to make it portable to fubar.
    You can use any of my Broker addons for a reference point on how to get used to it, calling functions from other addons to get it to display how you like (eg:stalker)
    **Note on that**
    I use ACP's global variable in the first line of Broker_ACP:
    ACP.LDB = {}

    If one doesn't exist or if it's wiped in the addon somewhere, it will cause issues.
    Alternatively you can just change the name and remove the . (period) to make it it's own global.
    EG: Stalker_LDB vs Stalker.LDB
    But the global variable is not required, just makes it easier should you want to call for a specific section of your broker addon somewhere else.

    Dunno bout a fubar for stalker yet.

    Yes the console can be used to store variables
    /script local a,b = 1,4; print(a+b); returns 5

    local will mean it's bound with the scope of that script only.
    But you could alternatively create your own table for math calculations
    /script _G["calcs"] = _G["calcs"] or {}; local calcs = _G["calcs"]; calcs.a, calcs.b = 1,4; calcs.results = (a+b);
    
    /script local calcs = _G["calcs"]; print(calcs.results);
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.