Go Back   WowAce Forums > Official Addon Threads > Unit Frames > Grid & Grid2
Grid & Grid2 Discussions regarding Grid & Grid2 goes here.

Closed Thread
 
Thread Tools
Old 10-13-2010   #3211
Phanx
Seal Cub Clubbing Club
 
Phanx's Avatar
 
Join Date: May 2005
Location: United States
Posts: 8,103
Default Re: Grid

Click-casting, frames for units joining in combat, and group pets are all working now.

Most plugins can be "fixed" by simply installing Ace2 as a standalone addon, as an interim solution until their authors update them. The issue is that almost all existing plugins require Ace2, but almost none of them actually include Ace2, because they've been able to rely on the Grid core including it.

Some plugins (especially plugins that add indicators) will require more extensive changes as a consequence of the Ace2 --> Ace3 transition.

There isn't really any "how to write a plugin" documentation, but most plugins are fairly simple and shouldn't be too difficult to figure out. If you need help, post in the plugin's forum thread if it has one, or make a new thread for the plugin in the Help forum if it doesn't.
__________________
Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge
Troubleshoot an addon | Turn any code into an addon | More addon resources
Need help with your code? Attach or paste your whole, real files.
Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead!
Phanx is offline  
Old 10-13-2010   #3212
MSaint
Junior Member
 
MSaint's Avatar
 
Join Date: Jan 2009
Posts: 55
Default Re: Grid

Using the unit suffix attribute instead of the petgroup header is creating an issue . . . at least for me. There is a transparent unit frame for every player being shown in the pet group, so that pets do not necessarily appear at the top of their column (i.e. there is empty space if the pet does not belong to the first player in the party). This could get really messy in big raids.

Interestingly, if I revert to using Clique r143, which is a version of the old Clique that was patched for use in the beta, then I can drop all of the new code in GridLayout.lua that attempts to work with clique, go back to using the pet group headers, and everything works. Furthermore, if I do that, I can see the Grid frames in the Clique frame editor, but in the new version, even with the added code, I can not. So in some sense, this problem is a regression in Clique.

I will spend some time analyzing the whole problem today and let you know if I find anything useful.
MSaint is offline  
Old 10-13-2010   #3213
MSaint
Junior Member
 
MSaint's Avatar
 
Join Date: Jan 2009
Posts: 55
Default Re: Grid

Hah!! I found the solution to all your problems. Had to wade through the Blizzard code for a while to figure it out. Remember how GetModifiedUnit was returning a wrong result for pets? Well, Blizzard uses that function as well, and gets a wrong result. BUT, the way in which they PRODUCE the wrong result is related to setting the unit suffix for pet units, so there is a workaround. I will post a working version of GridLayout:CreateHeader() method in a few minutes that makes everything work correctly. I just have to answer the phone first, my wife is calling me :-p
MSaint is offline  
Old 10-13-2010   #3214
Abygail
Newbie
 
Join Date: Feb 2010
Posts: 8
Default Re: Grid

Thank you guys so much for all your work on this we all very much appreciate it! I tried loading Ace 2, and all my Grid "addons" and my FPS fell through the floor, and they still didn't work.

I don't know if anyone is maintaining those, but the "status" ones are very helpful, and it would be great to have them working again. I had to revert to the Clique version that was written for the PTR to get it to work, but I am very happy (I'm sure I'm not alone) to have a basic version of Grid and Clique both working.

Thank you all again very much.

P.S. The main plugins I am interesting in is the GridStatusShield- the one that shows the amount of Pw:Shield remaining on a member. I think it relies on the CornerText plugin though. I would be willing to pay for the time of anyone that could get those working, if it is reasonable of course.

Last edited by Abygail; 10-13-2010 at 05:44 PM.
Abygail is offline  
Old 10-13-2010   #3215
Phanx
Seal Cub Clubbing Club
 
Phanx's Avatar
 
Join Date: May 2005
Location: United States
Posts: 8,103
Default Re: Grid

Quote:
Originally Posted by MSaint View Post
Using the unit suffix attribute instead of the petgroup header is creating an issue
I was actually not getting any non-player pet frames using the pet header, with or without Clique. Unfortunately the issue you pointed out makes unitsuffix an unworkable permanent solution for raids (Greltok and I only tested it in a party).

I opened a ticket for the pet issue, here:
http://www.wowace.com/addons/grid/ti...ets-not-shown/

I'm going to go grab my three hours of sleep now, but I'll work on it some more tomorrow.

Edit: Note to self, reload the page before replying. I'll check out whatever solution you come up with tomorrow. I really wish Blizzard would quit changing the secure header stuff, so I can quit having to learn about it.
__________________
Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge
Troubleshoot an addon | Turn any code into an addon | More addon resources
Need help with your code? Attach or paste your whole, real files.
Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead!

Last edited by Phanx; 10-13-2010 at 05:54 PM.
Phanx is offline  
Old 10-13-2010   #3216
MSaint
Junior Member
 
MSaint's Avatar
 
Join Date: Jan 2009
Posts: 55
Default Re: Grid

Ok, here is the fixed up version of CreateHeader():

Code:
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():

Code:
      ...
      -- 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
      ...
MSaint is offline  
Old 10-13-2010   #3217
MSaint
Junior Member
 
MSaint's Avatar
 
Join Date: Jan 2009
Posts: 55
Default Re: 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.
MSaint is offline  
Old 10-13-2010   #3218
JamusPsi
Member
 
Join Date: Nov 2007
Posts: 11
Default Re: Grid

Okay, it looks like at least one indicator addon is trying to pull "frameClass" out of GridFrame and then replace it with its own override. frameClass held prototype and other methods like .prototype:AddIndicator, which were redefined by the indicator addon and then called using frameClass.super.prototype:AddIndicator.

It seems to me that GridFrame no longer has a frameClass exposed- probably because the target is expected to use the same class swap technique on prototype instead of frameclass. Except prototype holds some state, doesn't it?

Am I on the right track?
JamusPsi is offline  
Old 10-13-2010   #3219
wyldphire1
Newbie
 
Join Date: Aug 2009
Posts: 5
Default Re: Grid

Cannot get my Grid config window to open. I type /grid and when I hit enter, nothing happens. I have Waterfall installed. I also looked for it in my Addons tab under my Interface button when I hit escape... not there... Halp?
wyldphire1 is offline  
Old 10-14-2010   #3220
Greltok
Full Member
 
Join Date: Oct 2006
Posts: 101
Default Re: Grid

Quote:
Originally Posted by wyldphire1 View Post
Cannot get my Grid config window to open. I type /grid and when I hit enter, nothing happens. I have Waterfall installed. I also looked for it in my Addons tab under my Interface button when I hit escape... not there... Halp?
Did you install the alpha found here? It has not been pushed to Curse.
Greltok is offline  
Closed Thread

Tags
grid


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:35 PM.