• 0

    posted a message on AceGUI noob question
    Thank you Phanx. I was going though the docs you linked, but not entirely understanding them. Apparently, the only part I got correct was
    -- Register your addon with AceAddon
    MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
    
    -- Register your saved variables with AceDB
    MyAddon.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaultsTable, "Default")
    
    -- Register your options with AceConfigRegistry
    LibStub("AceConfig-Registry-3.0"):RegisterOptionsTable("MyAddon", options)
    
    -- Add your options to the Blizz options window using AceConfigDialog
    LibStub("[AceConfig-Dialog-3.0"):("MyAddon")
    Which I did not post, as I did understand that part. (Unbelievable, I know)

    I will keep reading the docs, and keep learning.
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceGUI noob question
    Afterthought: what I meant by an easier way was: can the AceGUI code be put right into the options table?
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceGUI noob question
    Assuming that you would be using the Blizzard Interface Options Panel, and AceGUI-3.0, I think the following would work:
    local options = {
        name = "MyAddon",
        handler = "MyAddon",
        type = "group",
        args = {
            firstChoice = {
                name  = "First Choice",
                desc = "This is the first choice in the options",
                type = "group",
                order = 1,
                get = "GetFirstChoice",
                set = "SetFirstChoice",
            },
            -- secondChoice, etc
        },
    }
    
    function MyAddon:GetFirstChoice()
        return self.db.profile.firstChoice
    end
    
    function MyAddon:SetFirstChoice()
        -- would you really need this?
        local frame = AceGUI:Create("Frame")
        frame:SetCallback("OnClose", function(widget) AceGUI:Release(widget) end)
        frame:SetLayout("Flow"
        -- or is all you need is the editBox stuff?
        
        local editBox = AceGUI:Create("Editbox")
        editBox:SetLabel("Some Text")
        editBox:SetWidth(200)
        editBox:SetCallback("OnEnterPressed", function(widget, event, text) self.db.profile.firstChoice = text end)
    end
    Would I really need the :Create("Frame" parts, and is there an easier way than the whole GetFirstChoice() SetFirstChoice() etc functions?
    Posted in: Lua Code Discussion
  • 0

    posted a message on [code review] SmartRes2 in progress
    I am looking for "you can't do that!" errors. http://pastey.net/129554 also, I was looking at the AceGUI-Widgets and saw some I'd like to use, such as the edit box, or colorPicker, and I'm a bit lost on how to use them in the options. For example, I want to define the regular res bar as green, and the collision as red, but have them user changeable with the picker.

    Can I do that within the options, the way I did for the LSM widgets? Furthermore, I know I must have callbacks to update the profile, but again, I am not sure where/how to use them.

    I am not asking anyone to rewrite my code (unless you absolutely must) but rather an example or two, from another addon or just the code brackets here.

    The reason I'm posting this now is because I don't want to finish up handling the options with their respective functions (is there an easier way?) and then find out I have to rip it all apart. And on that note, yes, I am mix and matching the handler functions with AceGUI, but want to standardize on AceGUI.

    Did any of that make sense?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SmartRes
    Updated the deDE, and it works now. This is for the original SmartRes.
    Posted in: General AddOns
  • 0

    posted a message on SmartRes deDE syntax error
    Well that's no good. I use the latest version of Scintilla Text Editor, but didn't change any of the prefs/options. Anybody use that program and know what to look for in case a setting is different from the previous version?

    If not, I will use Notepad to do up the file and follow Phanx's advice that way.

    Follow up: I found the option to switch encodings; it was on the File menu, and was not set to UTF-8, which I switched. Does anyone know how to permanently set this option in STE?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SmartRes deDE syntax error
    Ok, thank you Phanx. This is the error:
    Commit
    D:\World of Warcraft\Interface\AddOns\SmartRes\.pkgmeta
    D:\World of Warcraft\Interface\AddOns\SmartRes\ChangeLog.txt
    D:\World of Warcraft\Interface\AddOns\SmartRes\SmartRes-deDE.lua
    D:\World of Warcraft\Interface\AddOns\SmartRes\SmartRes.toc
    D:\World of Warcraft\Interface\AddOns\SmartRes\SmartRes-deDE.lua
    D:\World of Warcraft\Interface\AddOns\SmartRes\SmartRes.toc
    D:\World of Warcraft\Interface\AddOns\SmartRes\ChangeLog.txt
    D:\World of Warcraft\Interface\AddOns\SmartRes\.pkgmeta
    Commit failed (details follow):
    'pre-commit' hook failed with error output:
    trunk/SmartRes-deDE.lua has a syntax error:
    File not encoded correctly for game 'wow' (allowed encodings: utf-8 )
    Posted in: Lua Code Discussion
  • 0

    posted a message on SmartRes deDE syntax error
    I don't speak German, but Farook updated the translations for me. However, I updated the wrong file, and went to fix it. To make sure I didn't do that again, I was using SVN: Commit rather than the Branch/Tag method, then .. well, anyway, going about this the long way just in case.

    The updated deDE is here: http://pastey.net/129412 but it is throwing a syntax error, and I don't know where/what it is.

    Ideally, when the branch/tag is made, this should be 6.07d2 of SmartRes, and I don't want to drop the ball again.

    Anybody see what the error is, please?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SmartRes
    I have created a poll on the SmartRes2 site, asking for votes and comments on how to deal with ressers who do not watch collision bars for duplicate casts. I would appreciate all the constructive feedback possible, thank you.
    Posted in: General AddOns
  • 0

    posted a message on X-Perl Thread
    Quote from streetglow35
    I don't know where to post bugg reports but here's mine:
    When I duel the same person a few times, HP stops updating, same thing in arena sometimes and when in raids, thanks in advance.

    http://www.wowace.com/addons/xperl/tickets/
    Posted in: Unit Frames
  • 0

    posted a message on BigWigs
    I had to delete the SVs for BW when it went Ace3 a couple of weeks ago. Was throwing the same error 100s of times until I did. Now it works great. You may want to do that, and if the error persists, then repost, or file a ticket.
    Posted in: Raid AddOns
  • 0

    posted a message on X-Perl Thread
    Quote from ddduhamell
    I need help, I cannot get my focus frame to show up, every time i try to I get an error, <snip>

    That's because you can't set a focus using an addon. You must do it manually with /focus and /clearfocus
    Posted in: Unit Frames
  • 0

    posted a message on Something like "GetCurrentCast()"
    For such a simple addon, you don't need to "Ace" it, but if you are going to, use Ace3, as Ace2 is done.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.