• 0

    posted a message on Grid — compact party/raid unit frames
    Ok, figure this out. Was a real pain. The code for the secure group headers has changed from what they are giving us (confirmed thru stack traces). Points are only being cleared on UNUSED unit frames on update, so if the settings for a header change such that points need to be updated on unit frames that are actually in use, well, the old points aren't cleared.

    Fixing this eliminates the need for hooking SetPoint on the unit frames and eliminates the whole problem.

    The best fix I have found is to set an OnAttributeChanged script on the headers, and if the attribute being changed is one that affects the points, I clear the points on the child unit frames:

    local function GridLayout_OnAttributeChanged(self, name, value)
       if name == "point" or name == "unitspercolumn" or name == "columnanchorpoint" then
          self:ClearPoints()
          if self:IsVisible() then
             SecureGroupHeader_Update(self)
          end
       end
    end


    and of course:

    function GridLayout.prototype:ClearPoints()
       local count = 1
       local uframe = self:GetAttribute("child" .. count) 
       while uframe do
          uframe:ClearAllPoints()
          count = count + 1
          uframe = self:GetAttribute("child" .. count)
       end
    end


    I set the script for each header in GridLayout:CreateHeader()

    I have to run to catch a plane now, so I can't do a whole ton of testing or anything now. I'll a very thorough look at it when I get home tomorrow.

    I do hope this is helpful.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid — compact party/raid unit frames
    Heya,

    I just posted a bug report for Grid: groups with multiple columns don't align correctly, ever (not groups that could have multiple columns, only groups that actually DO have multiple columns). Most people don't use groups with multiple columns, I know.

    I realize the normal thing to do is to just post the ticked and not post here, sorry for that. The reason I'm posting is selfish, and, I realize, not your problem. It's that this particular bug has a big impact on my module, where groups with multiple columns / rows come up all the time and display completely wrong at the moment.

    I have a heavily tested alpha that is really ready for beta, but I can't reasonably tag it beta and syndicate knowing that it is going to constantly display stuff wrong. So I have an especial interest in this bug being fixed.

    I fully tracked down the bug and included that info and how to fix it in the bug report.

    If my posting here about the bug is too annoying, well, I suppose I won't be offended if I get deleted or flamed.

    IMPORTANT EDIT: I've been looking at this closely, and realized that what was done that creates this bug (hooking SetPoint and clearing all points each time a point is set) was done to work around another bug . . . so I suppose this should be ignored for now. I'm working hard to figure out the bug underneath this bug.
    Posted in: Grid & Grid2
  • 0

    posted a message on GridConfigurableLayouts
    Hey folks.

    My mistake a few weeks ago drove me to dive back into this mod and create an updated version. A little embarrassment can go a long way ;)

    I have an alpha up that has a number of improvements. First off, the GUI has been moved out to its own tab in the Grid options, since this module has so many options of its own. This fact alone should tell you that it is not necessarily for the faint of heart, it really is very configurable.

    The biggest change is that I have added sorting capabilities to the module which let you sort within groups not only by name and index, but also by role and class. Included in this is the ability to specify the sort order (i.e. Tanks, Healers, Melee, Ranged). You can also force yourself to appear at the beginning of your group.

    A number of questions and requests I have had in the past have been impossible without this functionality, so I decided it was worth it. For example, you can now put an entire ten man in one or two rows sorted by role. Used in conjunction with GridStatusRole, this can be a visually easy to look at arrangement of the raid.

    There are one or two small features I would like to add before pushing it to beta, but the main thing I need is some testing. If anyone finds these features interesting and potentially useful, it would really help me a ton to have some testers and feedback.

    Thanks very much!
    Posted in: Grid & Grid2
  • 0

    posted a message on GridConfigurableLayouts
    Yikes. Sorry, my answer was absolutely wrong . . . haven't been working on this in way too long. My sieve-like memory thought it was by index, though if I had thought a little harder I would have remembered that there were both options.

    Even worse, I had no memory at all of an attribute that preserved the order from the name list, and it frankly would be very helpful, because it means that my module could in fact sort in an arbitrary order by re-ordering name lists (ooc only, but still helpful).

    Ah well. I really need to get back to this, as I believe it also needs some fixing (last version is pre Cata release, based on beta). Which also means I should level my healer.

    Once again, sorry for the wrong answer. I definitely should have done a little memory refresher before answering here.

    Thanx for catching it, Phanx.
    Posted in: Grid & Grid2
  • 0

    posted a message on GridConfigurableLayouts
    Phil,

    Sorry for the delay in answering.

    Tbh, I haven't been working on this addon for some time, and what is worse, I haven't leveled my healer yet. If you look at the date of the last update, you'll see that it was based on the beta, since I haven't touched it since Cata release. I'll get on it soon, although it's also true that I have never gotten much feedback or requests for this to be updated. Still, I will be doing it.

    All that is to say, it could be broken, although this is the first feedback I've heard on it.

    Unfortunately, there is no way to force a given order within groups, and alphabetical is not one of the orders that Blizz offers in the group headers used by grid. So, no, there isn't a way to order the groups by name.
    Posted in: Grid & Grid2
  • 0

    posted a message on ...and an "Item List" widget also compatible with AceConfigDialog
    To accompany the widget I posted about last week (although I got no response on that, so it may not interest anyone at all) I have also created a widget compatible with the "select" type in AceConfigDialog. The widget takes an array of itemstrings (or a table of key-itemstring pairs) and puts them in a list showing icon and itemname. Clicking on an item fires "OnValueChanged". It is (intentionally) not a drop down list, so if the list is going to be long it is a good idea to place it in a scroll box (e.g., by creating an inline group in ACD).

    The widgets can also be told to take over their own tooltips, putting the standard item tooltip up for whatever item has the mouse. In ACD this is accomplished by setting the desc field to "#ItemToolTip#". Outside of ACD, you can set a flag on the widget itself (widget:UseItemTooltip(true)).

    Again, the point of all this is to make it easy to have an item/spell/macro droptarget and selection list that don't require you to create a custom config frame around them.

    Needless to say, you can also use these widgets in a custom frame, and this makes them more configurable.

    If at any point anyone thinks they might find these useful, or wants to add them to any repository of widgets (changed in any way they see fit), I'm happy to make the code available, and the only constraint is any constraint from the Ace license (I borrowed much from the existing Ace widgets).
    Posted in: Ace3
  • 0

    posted a message on a droptarget button widget compatible with AceConfig
    Hey folks,

    I´m not sure this is where I should post this, and I´m not absolutely sure nobody has done it before (although I couldn't find anything).

    I wrote a widget that implements a button + label and functions as a drag-drop target. The main point of the widget is that it's compatible with the AceConfig 'type="input"'. Ok, when I say I wrote it, that is actually an exaggeration. Most of the code is drawn from one or another existing AceGUI widget.

    I mainly did this because it seemed a lot easier than implementing my entire configuration frame manually just because I needed a drop target button.

    The source file includes a full AceConfig example in the comments, for extra ease of use.

    Basically, set, get and validate all take or pass an itemString for items and spells, or "macro:nn" for macros.

    Is there any place where useful (I think) widgets can be put for general use? If not, well, if anyone is interested they can pm me and I'll get them the code.
    Posted in: Ace3
  • 0

    posted a message on GridConfigurableLayouts
    Unfortunately, that would be quite difficult. My module depends on Grid for laying out the groups visually and for setting them as vertical or horizontal. Grid is not designed in a way that permits layouts containing both vertical and horizontal groups.
    Posted in: Grid & Grid2
  • 0

    posted a message on GridConfigurableLayouts
    I think he means just one group that has the whole raid in it.

    The answer is yes, this is easy to do, but no, there is no way to do it in game without adding something. It requires a layout with the unitspercolumn set to the max raid members, and with the groupfilter set to include all groups.

    If you tell me why it is useful then if it seems as though others might need it, I will make it available through my module, and if not, I will send you a message telling you how to do it for yourself, which is not hard at all.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid — compact party/raid unit frames
    Okay, thank you. Vuhdo does this and it is a nice feature.


    Hmm. Abygail, do you mean according to max health, as measured before combat starts? It seems to me that sorting units according to actual health during combat is not even theoretically possible since, as Phanx says, the release of BC. You would really surprise me if this were being done.

    As far as sorting by max health ahead of time, that is theoretically possible, but unfortunately would require a way of doing things (specifically the way headers and frames are created) that is very different from the way Grid is set up.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid — compact party/raid unit frames
    Heya Phanx et al. The reason why pets are still spaced out is because the whole fix depends on REINTRODUCING the use of SecureGroupPetHeaderTemplate for pet groups, and the fix added a few lines later makes that work. As long as you are not using the pet headers, the frames will be created for all the players in the group/raid. The fix to the latest alpha (r1372) as is, would be to change line 41 of GridLayout.lua to the following:

    local header = CreateFrame("Frame", "GridLayoutHeader" .. NUM_HEADERS, GridLayoutFrame, (isPetGroup and "SecureGroupPetHeaderTemplate" or "SecureGroupHeaderTemplate"))


    The code added on lines 53 and 54 makes the pet headers work with clickcast template because it overcomes the Blizz bug that was making the use of pet headers fail.

    Sorry for the confusion about this, I should have commented my posted code better.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid
    Hey again guys. I hope my insistance is not too annoying. Just want to show you the problem I was referring to upthread with the pets, still there in r1364 (these are both Group 10 w/pets):



    And with my posted changes:



    Now, I'm guessing you guys found something wrong with my code, in which case I apologize. Let me know if it is something I can look at or help with.

    Thanks as always for all your work on this.
    Posted in: Grid & Grid2
  • 0

    posted a message on Help updating Grid plugins for 4.0
    MrHumpty, since all you are doing is setting L[text] = text, you can go ahead and replace your locale code with:

    local L = {}
    setmetatable(L,{ __index = function(l, text) return text end})
    


    instead of having to have them all typed out individually.
    Posted in: AddOn HELP!
  • 0

    posted a message on Grid
    Gah, go sleep! Don't worry! People can wait a little while! Sleep and work > WoW.

    Yeah, the secure headers are a bit of a mess at the moment.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid
    Ok, here is the fixed up version of CreateHeader():

    function GridLayout:CreateHeader(isPetGroup)
       NUM_HEADERS = NUM_HEADERS + 1
    
       local template = isPetGroup and "SecureGroupPetHeaderTemplate" or "SecureGroupHeaderTemplate"
       if ClickCastHeader then
          template = template .. ", ClickCastUnitTemplate"
       end
    
       local header = CreateFrame("Frame", "GridLayoutHeader" .. NUM_HEADERS, GridLayoutFrame, template)
    
       for k, v in pairs(self.prototype) do
          header[k] = v
       end
    
       header:SetAttribute("template", "SecureUnitButtonTemplate")
       
       -- Fix for bug on the Blizz end when using SecureActionButtonTemplate with SecureGroupPetHeaderTemplate
       if isPetGroup then
          header:SetAttribute("useOwnerUnit", true)
          header:SetAttribute("unitsuffix", "pet")
       end
       ...
    


    And then you have to catch any cases where a layout tries to set the useOwnerUnit attribute in GridLayout:LoadLayout():

          ...
          -- apply defaults
          if defaults then
             for attr, value in pairs(defaults) do
                if attr == "unitsPerColumn" then
                   layoutGroup:SetAttribute("unitsPerColumn", value)
                   layoutGroup:SetAttribute("columnSpacing", p.Padding)
                   layoutGroup:SetAttribute("columnAnchorPoint", getColumnAnchorPoint(p.groupAnchor, p.horizontal))
                elseif attr == "useOwnerUnit" then -- related to fix for using SecureActionButtonTemplate, see GridLayout:CreateHeader() 
                   if value == true then
                      layoutGroup:SetAttribute("unitsuffix", nil)
                   -- else do nothing or you will break things!
                   end
                else
                   layoutGroup:SetAttribute(attr, value)
                end
             end
          end
    
          -- apply settings
          for attr, value in pairs(l) do
             if attr == "unitsPerColumn" then
                 layoutGroup:SetAttribute("unitsPerColumn", value)
                 layoutGroup:SetAttribute("columnSpacing", p.Padding)
                 layoutGroup:SetAttribute("columnAnchorPoint",  getColumnAnchorPoint(p.groupAnchor, p.horizontal))
             elseif attr == "useOwnerUnit" then -- related to fix for using SecureActionButtonTemplate, see GridLayout:CreateHeader() 
                if value == true then
                   layoutGroup:SetAttribute("unitsuffix", nil)
                -- else do nothing or you will break things!
                end
             elseif attr ~= "isPetGroup" then
                layoutGroup:SetAttribute(attr, value)
             end
          end
          ...
    
    Posted in: Grid & Grid2
  • To post a comment, please or register a new account.