Design goals
What is now known as Grid2 started on two ideas:
Drop Ace2 as a framework and use Ace3 instead: As Grid is heavily based on AceOO, a part of the Ace2 framework that has been completely dropped, the switch was probably a little bit more difficult than other addons.
Use unit ID as identifiers instead of unit names: A lot of issues with Grid right now are caused by this design decision. After thinking about rewriting the Roster Library, both Pastamancer and I came to the conclusion that it would be much easier and faster to only rely on unitIDs.
Implementation features
Apart from this two goals, I have looked at the kind of modifications or features are mostly added to Grid by other addons. The immense majority of them provide either new Statuses, new Indicators, or both. Grid original design of status and indicators was not easy to hook into. The type of data that status could transmit to indicators was limited, a lot of base indicators and status were highly correlated one with another, and adding indicators was not an easy task.
Grid2 completely change this. Indicators and status have become "objects" that Grid2 and other addons can create, register and link independently. status/indicators declare the type of data they provide/need, and (not yet implemented) the core make sure that you link them correctly. I suggest that authors that worked on Grid based addon take a look at modules/IndicatorIcon.lua and modules/StatusAggro.lua for simple examples of both objects. Note that the type of data exchanged between status and indicators is not limited by the core.
As a side effect of this rewrite, the amount of processing that has to be done when status change has been reduced. I also took care of a few processor-heavy statuses (health, mana, auras, range) to make sure they are as fast as possible.
And that's about it for now.
What's left to be done
Now that the rewrite is underway, other issues with Grid should be looked at. I'm going to list here stuff that we (Maia, Pastamancer and I) have talked about and thought of :
The grid configuration needs a complete overhaul. A lot of beginner mistakes come from the fact that right now, the Grid configuration allows to completely break the usability of Grid. We want to address this. With the new architecture, the risk is even bigger, as indicators are completely uncorrelated (for instance, "text" and "textcolor" are two different indicators that can be linked to different statuses). The new Grid configuration should be a lot more aware of what Status and Indicators are, and how it makes sense to link some of them and not others. The fact that the type of information that they exchange is now explicit will help, but the configuration window must have more information than this. (To extend the example. The configuration should be aware that "text" and "textcolor" are both part of the visual representation of the text element and provide a unique form to configure both.)
Easier configuration of layouts for diffent gameplay. The idea is to incorporate something like GridDynamicLayout in the core. As part of this, the distinction between the "raid" layout and the "party" layout should be removed. Also, some form of layout design should also be added to the configuration.
Give a blinking state to statuses. Right now, statuses have two states: Active or Inactive. It would be interesting to add a new "blinking" state, that should be visually easy to see. The indicator interface will probably need some change for this to work.
I probably missed a lot of other things.
What Grid2 won't have :
More (visible) options. Quite the contrary. We want the new Grid configuration to be easier for the beginner.
More indicators. Well, I mean here that you should not expect to have mana bars, seven text lines and thirty-two icons per side in grid core.
Looking forward to it,although I got no problems at all with Grid, but well most here like experimenting :D
Will you port/integrated GridAlert btw? Its the BEST addition to Grid on earth, especially with my SoS sound that is so annoying that you cant miss it :D (http://home.arcor.de/Matrix110/sos.wav)
Let's figure out how the configuration works in detail before worrying about adding features. The easier the config is to use, the more features it will be able to handle.
Integrate, No. I'll probably try to port GridAlert, although the new architecture makes it more difficult. This is very low priority for me until the time I think I can stop using the original Grid.
More (visible) options. Quite the contrary. We want the new Grid configuration to be easier for the beginner.
So... does this mean Grid2 will have fewer "core" options than the original Grid? If so, which options are getting dropped? What exactly does "visible" mean? Does it mean advanced users who want to change, say, the frame dimensions will have to do so by editing Lua?
So... does this mean Grid2 will have fewer "core" options than the original Grid? If so, which options are getting dropped? What exactly does "visible" mean? Does it mean advanced users who want to change, say, the frame dimensions will have to do so by editing Lua?
The configuration is still completely in the plannig stage. I plan to keep most of the existing options in the AceDB though. That's what I meant by "visible". The configuration might not allow it, but a simple macro will do. Also, it won't be possible to link any status to any indicator, so people using (very) exotic configuration might not be able to keep them.
Got the following error when wanting to try out Grid 2:
I got the error on logging in and I couldn't see any Grid 2 frames anywhere. The Grid 2 options loaded fine enough however.
[2008/06/04 00:22:53-4305-x1]: Grid2-$Rev: 74477 $\GridLayout.lua:814: attempt to perform arithmetic on a nil value
Grid2-$Rev: 74477 $\GridLayout.lua:867: in function `Scale'
Grid2-$Rev: 74477 $\GridLayout.lua:478: in function <Interface\AddOns\Grid2\GridLayout.lua:471>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[1]":9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?:
AceAddon-3.0\AceAddon-3.0.lua:341: in function `EnableAddon'
AceAddon-3.0\AceAddon-3.0.lua:353: in function `EnableAddon'
AceAddon-3.0\AceAddon-3.0.lua:411: in function <Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:397>
<in C code>: in function `LoadAddOn'
Interface\FrameXML\UIParent.lua:908: in function `UIParentLoadAddOn':
Interface\FrameXML\UIParent.lua:234: in function `CombatLog_LoadUI':
Interface\FrameXML\UIParent.lua:327: in function `UIParent_OnEvent':
<string>:"*:OnEvent":1: in function <[string "*:OnEvent"]:1>
---
Sorry for the long pastey, but here goes what happens when I log in and stay in Ironforge for a couple of minutes. Still no Grid and it happens all the time. Additionally, despite what Bugsack says, I am using r75983. I also just checked, and I do have all the addons required by Grid 2, listed in the X-Embeds section of the toc.
Note that I'm (dry)coding the new option infrastructure for Grid2. It's not a good moment to try it, as you will have difficulties changing any options.
Running the first run command outputs the following: "nil 500" but then after running "the fix" it would only return "nil 511.99999982048", even after reloading the UI.
The second command doesn't fix Grid 2, it does however give me a shiny new error message :)
[2008/06/04 15:15:18-4314-x1]: Grid2-$Rev: 74477 $\GridLayout.lua:519: attempt to perform arithmetic on a nil value
Grid2-$Rev: 74477 $\GridLayout.lua:548: in function `ResetPosition'
<string>:"Grid2Layout:ResetPosition()":1: in main chunk
<in C code>: in function `RunScript'
Interface\FrameXML\ChatFrame.lua:1598: in function `value':
Interface\FrameXML\ChatFrame.lua:3040: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2732: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2753: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>
---
Used Grid2 for a while and it was working fine, did throw the occasional error you warned about but nothing that made it stop working. But some revisons back i started getting same errors as Hjalte.
Getting this error in bugsack with latest version:
Grid2-$Rev: 74477 $\GridLayout.lua:519: attempt to perform arithmetic on a nil value
Grid2-$Rev: 74477 $\GridLayout.lua:572: in function `Scale'
Grid2-$Rev: 74477 $\GridLayout.lua:182: in function <Interface\AddOns\Grid2\GridLayout.lua:175>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[1]":9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?:
AceAddon-3.0\AceAddon-3.0.lua:341: in function `EnableAddon'
AceAddon-3.0\AceAddon-3.0.lua:353: in function `EnableAddon'
AceAddon-3.0\AceAddon-3.0.lua:411: in function <Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:397>
---
Grid2-$Rev: 74477 $\GridLayout.lua:519: attempt to perform arithmetic on a nil value
Grid2-$Rev: 74477 $\GridLayout.lua:548: in function `ResetPosition'
<string>:"Grid2Layout:ResetPosition()":1: in main chunk
<in C code>: in function `RunScript'
Interface\FrameXML\ChatFrame.lua:1598: in function `?':
Interface\FrameXML\ChatFrame.lua:3003: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2732: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2753: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>
---
I know it's not a good time to use Grid2, but i just can't help myself ;), ofc. i do still use Grid which i disable every time i test Grid2.
Using above code doesn't seem to have any effect and doesn't seem to give any errors either. When testing Grid 2, I'm of course disabling orginal Grid.
I have quite a busy schedule lately, and I haven't been able to test ingame the latest change I made to Grid2. Hopefully, I'll have some time later today and I might be able to make it usable again, so stay tuned.
Latest additions to Grid2:
"Blinking" status and indicators. Status can now be in three state for each unit: inactive, active and "blinking". Indicator can provide a frame to Grid2 that will blink if the status with the highest priority is in the "blinking" state. The Aggro status use this. Grid2 allows different Blinking effects.
Grid2 will change the layout based on the group and/or zone you're in. Layouts for solo, party, raid, pvp and arena are configurable. You can't (yet) set a specific layout for a specific zone.
Buffs and Debuffs can be tracked by names. You can choose to track any debuff or buff of that names or restrict to yours only. You can set a time threshold below which the status will switch from active to blinking. I have hardcoded hots for druids and priest, and also Forebearance and Weakened Soul for their respective classes. Lifebloom hot will show a different color depending on the stack count.
I have removed all option tables from Grid2 proper and put them in a new addon called Grid2Options. The idea behind this is that Grid2 itself is small, it's configuration is huge but most of the time unused, so it makes sense to have this configuration only load when needed. Note that this is not (yet) the new configuration UI.
BTW, Revision 76062 should correct the error you've been reporting.
utf8sub errors must be caused by a problem in the zip generator. I haven't touched the externals. Make sure you have the utf8 libraries when using Grid2 (There's no Grid2 package, you have to get it from the SVN).
What is now known as Grid2 started on two ideas:
Implementation features
Apart from this two goals, I have looked at the kind of modifications or features are mostly added to Grid by other addons. The immense majority of them provide either new Statuses, new Indicators, or both. Grid original design of status and indicators was not easy to hook into. The type of data that status could transmit to indicators was limited, a lot of base indicators and status were highly correlated one with another, and adding indicators was not an easy task.
Grid2 completely change this. Indicators and status have become "objects" that Grid2 and other addons can create, register and link independently. status/indicators declare the type of data they provide/need, and (not yet implemented) the core make sure that you link them correctly. I suggest that authors that worked on Grid based addon take a look at modules/IndicatorIcon.lua and modules/StatusAggro.lua for simple examples of both objects. Note that the type of data exchanged between status and indicators is not limited by the core.
As a side effect of this rewrite, the amount of processing that has to be done when status change has been reduced. I also took care of a few processor-heavy statuses (health, mana, auras, range) to make sure they are as fast as possible.
And that's about it for now.
What's left to be done
Now that the rewrite is underway, other issues with Grid should be looked at. I'm going to list here stuff that we (Maia, Pastamancer and I) have talked about and thought of :
I probably missed a lot of other things.
What Grid2 won't have :
Sometimes, it very possible that it won't work at all. Don't post bug reports, I'm probably already aware of them.
I do not use it in game yet, and I don't suggest you do if you don't want to be flooded by errors in the middle of a fight.
Will you port/integrated GridAlert btw? Its the BEST addition to Grid on earth, especially with my SoS sound that is so annoying that you cant miss it :D (http://home.arcor.de/Matrix110/sos.wav)
Let's figure out how the configuration works in detail before worrying about adding features. The easier the config is to use, the more features it will be able to handle.
Integrate, No. I'll probably try to port GridAlert, although the new architecture makes it more difficult. This is very low priority for me until the time I think I can stop using the original Grid.
So... does this mean Grid2 will have fewer "core" options than the original Grid? If so, which options are getting dropped? What exactly does "visible" mean? Does it mean advanced users who want to change, say, the frame dimensions will have to do so by editing Lua?
The configuration is still completely in the plannig stage. I plan to keep most of the existing options in the AceDB though. That's what I meant by "visible". The configuration might not allow it, but a simple macro will do. Also, it won't be possible to link any status to any indicator, so people using (very) exotic configuration might not be able to keep them.
I got the error on logging in and I couldn't see any Grid 2 frames anywhere. The Grid 2 options loaded fine enough however.
Weird. Does it happens each time ?
Try:
http://ace.pastey.net/88913
When I use the run command, nothing happens. I am downloading Grid 2 from the svn through tortoise without externals.
http://ace.pastey.net/88915
Oh, and if you want to play Debug, I'm on IRC most of the time. Same username.
This should fix your issue :
Note that I'm (dry)coding the new option infrastructure for Grid2. It's not a good moment to try it, as you will have difficulties changing any options.
The second command doesn't fix Grid 2, it does however give me a shiny new error message :)
Getting this error in bugsack with latest version:
tried what you suggested to Hjalte
and got:
and after trying the fix bugsack came up with:
I know it's not a good time to use Grid2, but i just can't help myself ;), ofc. i do still use Grid which i disable every time i test Grid2.
I also got these 3 errors:
http://ace.pastey.net/88973
Using above code doesn't seem to have any effect and doesn't seem to give any errors either. When testing Grid 2, I'm of course disabling orginal Grid.
Latest additions to Grid2:
BTW, Revision 76062 should correct the error you've been reporting.
utf8sub errors must be caused by a problem in the zip generator. I haven't touched the externals. Make sure you have the utf8 libraries when using Grid2 (There's no Grid2 package, you have to get it from the SVN).
Grid2 can be used at the same time as Grid.
EDIT:
After loading the options, trying to reach them ingame gave me 6 errors. They're all in this pastey:
http://ace.pastey.net/88978
Grid2 looks great, I love the blinking icons.