• 0

    posted a message on Packager down?
    Quote from egingell
    Work around: Using TortoiseSVN (and repo type SVN, of course).

    1) Commit changes.
    2) Explore repository (Repo-browser)
    3) Right click "trunk"
    4) Click "Copy to..."
    5) Change the last folder, "trunk", to "tags" followed by the new tag name. Should look like this, "svn://<username>@svn.curseforge.net/<game ID>/<package name>/mainline/tags/<tag name>".

    Side note: You can create an empty directory in the tags folder, but as soon as the packager sees it (almost immediate), you can no longer copy files into it. It's obviously not the packager that is malfunctioning, it seems to be the interface between web and repo that is malfunctioning.


    I was able once to tag in a similar way my version 0.0.0.4a (using Eclipse, SVN plugin Copy to.. and then commit to server). Since that time I'm not able anymore to tag in this way my repository.

    From Eclipse I get:

    Some of selected resources were not committed.
    svn: Commit failed (details follow):
    svn: 'pre-commit' hook failed with error output:
    Refusing change of type 'D   ' to tags/0.0.0.4a beta (frFR)/locale/frFR.lua
    Tags cannot be changed. Please re-tag under a new name. 


    But if I update from server or replace my version with latest from head I can't see a tag like the given above, which would verify, that I try to tag two times with the same name.

    And of course, tagging using the web STILL

    • doesn't report any error (instead it tells everything is alright and the repository has changed - which in fact is a lie)
    • does nothing (if you update local copy, tag should at least be there)
    • creates no new zip file

    Currently it seems to work, if I call tag from Eclipse/SVN, but not always a file is created - no idea why. Also I have no idea, how long this workaround helps ...

    It would be great if this feature (tagging your version, creating a zip file according to tag name) would work again.

    Thx
    Posted in: General Chat
  • 0

    posted a message on Newbie needs help on callback for Who list and AceConfig Option tables
    Quote from Slakah
    Quickly looked over your code and you have some more pressing issues at hand, i.e.
    --- loops until a given time in seconds has passed
    -- @param seconds - Integer Amount of seconds to wait
    function GuildAdmin:WaitForSec(seconds)
        local timer = GetTime()+seconds
        while GetTime() <= timer
        do
            local i = 1
        end
    end
    Use OnUpdate/Animation/Ace-Timer stuff instead, your method will lock WoW for x seconds (unless your using coroutines iirc).

    finally Spam = Bad, and imo this "feature" should be removed in favour of the better built in opt in "Guild recruitment channel".


    Checked out my new version? You find it there disabled. This was only because I didn't know how to get the who list and therefore had an delay included in the search button.

    This is obsolete now and not used anymore.

    Apart from that - is any delay function you see automatically spam?
    Posted in: Ace3
  • 0

    posted a message on Newbie needs help on callback for Who list and AceConfig Option tables
    Quote from Adirelle
    AFAIK the GUI is refreshed after every user interaction with it, so you should not call GuildAdmin:NotifyConfig() in every handlers, especially in getters.

    As Torhal said, using WhoLib would avoid you the hassle of dealing with who queries, plus preventing conflicts with other addons that issue who queries (at least the ones that also use WhoLib).

    IMO you should have your button handler starts the queries using WhoLib and use a callback to fill data and call GuildAdmin:NotifyConfig() only at that time. Your getters should only return the processed data and do not process anything on their own.


    Thanks a lot for this hint - I wasn't aware about this point. Great
    Posted in: Ace3
  • 0

    posted a message on Newbie needs help on callback for Who list and AceConfig Option tables
    Quote from Torhal
    You'll want to look at WhoLib in order to properly gather data from a who query.

    As for named functions in the get/set - that isn't strictly necessary since you're only defining them once. If this were something in a loop or that could be user-created via mouseover, then named functions would be the way to go.

    I stated that I skipped the rest of the message because without understanding why you used the config in that manner (which I disagree with - it's a crutch and you're not learning anything from it), I didn't want to make any assumptions and therefore reading the code would be useless.


    Thanks for the hint with the mouseover. I've investigate who lib already but didn't get it to work easily.

    By writing the original post, I discovered that I should use the update of the data in the event handler (didn't do it before). This has boosted up my results, but still, from a GUI perspective (user clicks and wants to get a reasonable result) I'm missing the control I would like to have over GUI reactions.
    Posted in: Ace3
  • 0

    posted a message on Newbie needs help on callback for Who list and AceConfig Option tables
    Mainly I did it, because I got lost in frame handling and configuration provides a simple GUI framework. So using the widgets there for a guild administration console. One thing is to look for people without guild (doing a who lookup) to ask them if they want to join, to invite them and so on.

    Apart from "misuse" of the configuration GUI framework, what else is wrong.

    I is not easy to learn, if the only comment is, I stopped at the first line reading.
    Posted in: Ace3
  • 0

    posted a message on Newbie needs help on callback for Who list and AceConfig Option tables
    Hi everybody,

    I'm still bloody new to lua programming and I think I don't understand correctly how to implement a proper update of AceConfig option table list boxes when using who list.

    Below are some excerpts from my code (sorry for any stupidtiy you may find in there so far - help and hints welcome). Complete code can be obtained from GuildAdmin-0.0.0.4_beta.zip

    I'm asking myself, if I should use instead named functions for get and set, which I also call when the event happens. Or do I have to install a callback in the get function, that reacts on the who list update? Or should the solution be totally different and whole approach is wrong.

    Basically I have concentrated all somehow constants in my GuildAdminCore.lua to have one place, where this is changed (maintenance). Apart from this I tried to get as close as possible to a MVC approach. Tried to hide any external library from rest of program (only in core) also for maintenance reasons.

    GuildAdmin.<var name> are global GuildAdmin variables, which is not at all OO style using them so intensive at the moment.

    Part of the option table

                    recwhosearch = {
                        order = 1,
                        type = "execute",
                        width = "full",
                        name = GuildAdmin:getColoredText(L["Search"], "GOLD"),
                        desc = L["Search desc"],      
                        func = function()
                                    -- get the who list with correct filter
                                    GuildAdmin:FireWhoList()
                                    -- reasonable wait time
                                    GuildAdmin:WaitForSec(2)
                                    GuildAdmin:NotifyConfig()
                                    GuildAdmin.RecruitNewSearch = true
                                 end,    
                        cmdHidden = true,
                    },
                    recwholist = {
                        order = 2,
                        type = "select",
                        width = "full",
                        style = "dropdown",
                        name = GuildAdmin:getColoredText(L["players without guild"], "GOLD"),
                        desc = L["players without guild desc"],
                        values = function()
                                    -- fetches the current who list
                                    GuildAdmin.RecruitCurWhoList = GuildAdmin:GetRecruitWhoList()
                                    GuildAdmin:NotifyConfig()
                                    return GuildAdmin.RecruitCurWhoList
                                 end,    
                        get = function()
                                    if GuildAdmin.RecruitNewSearch
                                    then
                                        -- get first char on new search if not set
                                        GuildAdmin.CurWho = GuildAdmin:GetWho(GuildAdmin.RecruitCurWhoList, GuildAdmin.CurWho)
                                        GuildAdmin.RecruitNewSearch = false
                                    end    
                                    GuildAdmin:NotifyConfig()
                                    return GuildAdmin.CurWho
                              end,
                        set = function(index, value)
                                    -- reset CurInvited
                                    GuildAdmin.RecruitCurInvited = "."
                                    GuildAdmin.CurWho = value
                                    GuildAdmin:NotifyConfig()
                              end,
                        cmdHidden = true,
                    },
    


    In the event handling I call a notify

        elseif (event == "WHO_LIST_UPDATE")
        then
            
            -- one of our get data events has happened      
            if (GuildAdmin.CurWhoListRdy > 0)
            then
                -- hide UI panel
                HideUIPanel(FriendsFrame)
                GuildAdmin.CurWhoListRdy = GuildAdmin.CurWhoListRdy - 1    
            end
            GuildAdmin:NotifyConfig()  
    


    --- Notifies options about changes from outside
    --
    function GuildAdmin:NotifyConfig()
    
        LibStub(ACE_CONFIG_REGISTRY):NotifyChange(GUILDADMIN_APPNAME)
        
    end 
    


    Code which fires who list update
    --- This will implicitly fire the WHO_LIST_UPDATE
    -- Sets the filter criteria and does a SendWho
    function GuildAdmin:FireWhoList()
    
        local filter = ""
        -- prepare filter as defined
        if GuildAdmin.RecruitCurZone
        then
            filter = filter.."z-"..'"'..GetZoneText()..'" '
        end    
         
        if (GuildAdmin.RecruitClassDefault ~= "ALLCLASSES")
        then
            filter = filter.."c-"..'"'..GuildAdmin.RecruitClasses[GuildAdmin.RecruitClassDefault]..'" ' 
        end
    
        if ((GuildAdmin.RecruitMinLvl > 0) or
            (GuildAdmin.RecruitMaxLvl < GuildAdmin:getMaxLevel())
           )
        then    
            filter = filter..tostring(GuildAdmin.RecruitMinLvl).."-"..tostring(GuildAdmin.RecruitMaxLvl)
        end
    
        -- get current data
        local numWhos, totalCount = GetNumWhoResults()
    
        -- mark it as our request
        GuildAdmin.CurWhoListRdy = GuildAdmin.CurWhoListRdy + 1   
        -- send request 
        SetWhoToUI(true)
        SendWho(filter)
    
    end
    


    Sets ups the who list table which should be displayed in the tooltip list
    --- This will get the content of the current who list for recruiting console
    -- as defined by the Recruit variables
    -- Sets the public variable GuildAdmin.RecruitCurWhoList to contain
    -- 
    -- @return whoList   Table - the who list in form [PlayerName]="PlayerInfos as name, level, class or zone"
    function GuildAdmin:GetRecruitWhoList()
    
        local charname, guildname, level, race, class, zone, classFileName, numWhos, totalCount, info
        local name, contactedBy, contacts, invited, leftGuild, guildLeft, joinedGuild, welcome, details, refusedGuild, later, lastContact, conClass, conLevel
        local zoneOK, classOK, levelOK, noGuildOK, whoListSet, includeContacted, includeRefused = true, true, true, true, false, true, true
        local curWhoList = {}
        -- reset temporary curWhoDetails
        GuildAdmin.CurWhoDetails = {}
    
        -- get data
        numWhos, totalCount = GetNumWhoResults()
               
        -- set CurWho to first player
        GuildAdmin.CurWho, guildname, level, race, class, zone, classFileName = GetWhoInfo(1)
        
        for i = 1, totalCount
        do
            zoneOK, classOK, levelOK, noGuildOK, includeContacted, includeRefused = true, true, true, true, true, true
            
            charname, guildname, level, race, class, zone, classFileName = GetWhoInfo(i)
            -- set curWhoDetails
            GuildAdmin.CurWhoDetails[charname].guildname     = guildname
            GuildAdmin.CurWhoDetails[charname].level         = level
            GuildAdmin.CurWhoDetails[charname].race          = race
            GuildAdmin.CurWhoDetails[charname].class         = class
            GuildAdmin.CurWhoDetails[charname].classFileName = classFileName
            
            info = GuildAdmin:getColoredText("["..tostring(level).."] ", "ORANGE")..GuildAdmin:getColoredText(charname, "GOLD").." "
    
            -- no class selected - show classes also
            if (GuildAdmin.RecruitClassDefault == "ALLCLASSES")
            then
                info = info..GuildAdmin:getColoredText(class, classFileName).." "
            else
                -- check class
                classOK = (classFileName == GuildAdmin.RecruitClassDefault)
            end
            -- no zone selected - show zone also        
            if (not GuildAdmin.RecruitCurZone)
            then
                info = info..GuildAdmin:getColoredText("- "..zone, "GREEN")
            else
                -- check zone
                zoneOK = (zone == GetZoneText())
            end
            --check level if selected
            if ((GuildAdmin.RecruitMinLvl > 0) or
                (GuildAdmin.RecruitMaxLvl < GuildAdmin:getMaxLevel())
               )
            then    
                levelOK = ((level >= GuildAdmin.RecruitMinLvl) and (level <= GuildAdmin.RecruitMaxLvl))
            end        
    
            -- check if already contacted and should be displayed
            name, contactedBy, contacts, invited, leftGuild, guildLeft, joinedGuild, welcome, details, refusedGuild, later, lastContact, conClass, conLevel = GuildAdmin:GetContacted(charname)
    
            -- update char info
            if (name ~= nil)
            then
                GuildAdmin:SetContactedDb(name, "class", class)
                GuildAdmin:SetContactedDb(name, "level", level)
            end
                                
            if GuildAdmin.RecruitShowContacted
            then
                -- enhance info, if contacted or left the guild
                if leftGuild
                then
                    info = info..info..GuildAdmin:getColoredText(" ("..GuildAdmin:myLocale("left guild")..guildLeft..")", "RED")
                else    
                    if (contacts > 0)
                    then
                        info = info..GuildAdmin:getColoredText(" ("..contactedBy..": "..tostring(contacts)..") ", "GREY")
                    end
                end
            else
                -- if no contacts then show
                includeContacted = (contacts == 0)             
            end
            
            name, refusedKey, key, hasRefused = GuildAdmin:GetContactedRefusedDb(charname, GuildAdmin:GetCurrentGuildName(), "refused")
            if GuildAdmin.RecruitShowRefused
            then
                -- enhance info
                if hasRefused
                then 
                    info = info..GuildAdmin:getColoredText(GuildAdmin:myLocale("refused"), "RED")
                end            
            else
                -- if not refused for current guild then show
                includeRefused = (not hasRefused)
            end
            
            noGuildOK = (string.len(guildname) == 0)
            if (zoneOK and classOK and levelOK and noGuildOK and includeContacted and includeRefused)
            then
                curWhoList[charname]=info
                -- avoid 
                if (not FriendsFrame:IsShown())
                then
                    whoListSet = true
                end
            end                 
            
        end
        
        if (not whoListSet)
        then
            -- mark following as our request
            GuildAdmin.CurWhoListRdy = GuildAdmin.CurWhoListRdy + 1   
            -- do a sort by guild, as this probably has changed
            SortWho("Guild")
            GuildAdmin.CurWho = GuildAdmin.RecruitNoPlayers
            curWhoList[GuildAdmin.RecruitNoPlayers]=GuildAdmin:getColoredText(GuildAdmin:myLocale(GuildAdmin.RecruitNoPlayers), "RED")
        end
        
        -- add the recently invited persons to the list
        for name, contact in pairs(GuildAdmin.db.global.Relations[GuildAdmin:GetCurrentRelationsKey()].Contacted)
        do
            if contact.invited
            then
                curWhoList[name] = GuildAdmin:getColoredText(name.." ", "GOLD")..GuildAdmin:getColoredText("(invited by "..contact.contactedBy..")", "GREEN")
            end
        end
        
        return curWhoList
    end  
    -- ==============================================================================
    
    Posted in: Ace3
  • 0

    posted a message on Formatting with \t
    Hi all,

    I'm trying to format tooltip strings, that are inserted via AddLine with "\t" to get tabulator output between the text items.

    But all it shows in the display is "?" instead of tab spaces. Output of script below would be
    My Info?tabbed text1?tabbed text2

    I'm saving coding files in UTF-8 and I'm working on Mac with Eclipse, but not with the lua plugin, which I was not able so far to configure it correctly to run on Mac without problems.

    Does anyone has an idea what could be the reason? Do I have to activate some rich text function?

    I've seen "My text".."\t".. "my tabbed text" in other addons and there it works. Even on my Mac.

    So no idea what I'm making wrong?

    I've tried also other tags like \n and \r, which work. I've tried to express it in decimals \010 and even as several UTF-8 codes that stand for \t but no effect at all. Also tried with

    [FONT="System"]format("%s\t%s","text1","text2")[/FONT] but having the same effect, always showing "?"

    I'm using the LibDataBroker object as in


    [FONT="System"]function ldb_broker:OnTooltipShow()
    -- header
    self:AddLine("Info Header")))

    -- prepare the display list
    self:AddLine("My Info".."\t".."tabbed text1".."\t".."tabbed text2")))

    end

    function ldb_broker:OnEnter()
    GameTooltip:SetOwner(self, "ANCHOR_NONE")
    GameTooltip:SetPoint("TOPLEFT", self, "BOTTOMLEFT")
    GameTooltip:SetWidth(500)
    GameTooltip:ClearLines()
    ldb_broker.OnTooltipShow(GameTooltip)
    GameTooltip:Show()
    end[/FONT]
    Posted in: Need Help?
  • To post a comment, please or register a new account.