eePanels has undergone a significant rewrite, and many new features have been implemented, and I consider it a 2.0 release. Unfortunately, the downside is your existing eePanel layouts are not compatible with the new version. Don't try to use eePanels and eePanels2 at the same time.
Changes:
- Major rewrite; less bloat, cleaner
- Embedded waterfall menu; shift-click on eePanel icon to open
- All panel options now available in Global Settings
- Individual panel locking; lock/unlock all panels through global options
- Ability to move/resize panels not parented to UIParent
- Individual panel dewdrop menus; right-click on an unlocked panel to display
- Warning messages for when you should perform a /reload
- Changing profiles no longer requires a /reload for the panels to appear
- Global Settings panel filters implemented; only change certain panel's settings
- User-supplied lua scripts; ability to add your own lua scripts to perform non-native tasks, etc.
- Support for panel anchoring
- Copy & Paste functionality
Losses
- Old layouts incompatible
- Translation files outdated; removing all but English until some friendly people can resupply new versions
One of the features added is the ability to attach lua scripts to a panel. Your scripts have full access to everything, so be careful when using it. Even though the scripts are tied into the saved variables for a panel, they are free to modify or access other panels, or anything else you want to. The scripts are attached to the panels for two reasons:
1) If you delete a panel, the script attached to it will be deleted as well. This helps when redistributing layouts
2) If you use the word THIS (in all caps) in a script, it will be replaced with the name of the panel the script is attached to. This makes it easy to come up with code which you can share with others.
Unfortunately, I can't get non-ace2 event hooks to work. I think it's because the normal WoW API requires OnEvent scripts to be set when the addon is loaded,which I don't do. Thus, if you want to register events you'll need to do so through the ACE2 event handling system. This part of the code might change if I can divine a better way to handle scripts. If you need to modify multiple frames on the same event, I would suggest creating a new frame, setting it's alpha to 0, and using it to hold all your scripts.
Please feel free to share any scripts you come up with, as I'm sure others will appreciate it. Here's one to get you started (pilfered from here).
Make an eePanel show when in a raid, and hide when not:
-- Change our panel's visibility when in/out of a raid
function eePanels2:RaidPanelVisibility(self, event, ...)
-- If we're in a raid
if GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
-- Show the panel this script is attached to
THIS:Show()
-- If we're not in a raid
else
-- Hide the panel this script is attached to
THIS:Hide()
end
end
-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
Make an eePanel resize when another frame (ChatFrame1 in this example) is resized. Note: This requires AceHook to be loaded, which isn't included with eePanels2:
-- Create a new ace2 addon for hooking
THIS_Hook = AceLibrary("AceAddon-2.0"):new("AceHook-2.1")
-- Create a function to resize the eePanel when the hooked frame is resized
function THIS_Hook:OnSizeChanged(frame, ...)
THIS:SetWidth(frame:GetWidth())
THIS:SetHeight(frame:GetHeight())
end
-- Hook to the frame we want to resize against (ChatFrame1 here)
THIS_Hook:HookScript(ChatFrame1, "OnSizeChanged")
Show a panel in combat, hide when out:
THIS:Show()
-- Showpanel ooc
function eePanels2:PLAYER_REGEN_DISABLED()
THIS:Show()
end
-- Hide panel ic
function eePanels2:PLAYER_REGEN_ENABLED()
THIS:Hide()
end
-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_REGEN_DISABLED")
eePanels2:RegisterEvent("PLAYER_REGEN_ENABLED")
When you say less bloat, do you have any particular numbers? As it took me a fair amount of time to tweak the layout I have (and no doubt took the original author more time to create it in the first place), I don't want to upgrade just yet unless we're talking very significant values.
I can certainly see a lot of uses for the script embedding though! Mayhaps another thread or wiki page for useful scripts might be appearing soon?
No, no numbers. I'm not making the claim that the addon performs better, either (although my guess is that it will). I'm too lazy to do any benchmarking or to create a performance metric matrix for a hobby addon.
A lot of redundant and sloppy code was removed. For instance, there used to be one ace option table for the global panel, and one for the individual panels. These have been consolidated, and saved 350-ish lines of code while improving consistency between the menus.
However, the new version is slightly larger (only a few kb) because of the new features.
As I only had 3 panels in my UI setup, I upgraded to the new version and found it pretty buggy. After creating 2 panels and tweaking some global settings, I found that I was unable to create a new panel using the global settings. Or rather, the panel wouldn't show up. Creating a panel using the default settings caused a new panel to appear. Doing a console reload removed all ability to edit any of my existing panels; they simply didn't show up in the menu (Fubar or Waterfall) for selection. I deleted my WTF files & eePanels folder, reinstalled it, and the same thing happened.
Out of curiosity, why are you not releasing this major rewrite as eePanels2? I reckon a lot of folks who don't read these forums will be pretty upset when they update via the WoWAceUpdater only to find their entire setup erased. Having the rewrite as a separate mod would let people update as the stability & functionality is proven superior.
after new install of the updated version.. i setup all my new bars the way they used to be and i do a reloadui and bang hit with an error that disabled all my bars :(
[2007/08/27 15:56:19-343-x1]: eePanels-2.0\core.lua:1824: attempt to perform arithmetic on field 'l' (a nil value)
AceAddon-2.0-46764 (Ace2):927: in function <Interface\AddOns\Ace2\AceAddon-2.0\AceAddon-2.0.lua:920>
<in C code>: ?
AceEvent-2.0-44693 (Ace2):262: in function `TriggerEvent'
AceEvent-2.0-44693 (Ace2):955: in function <Interface\AddOns\Ace2\AceEvent-2.0\AceEvent-2.0.lua:948>
I haven't been able to replicate either of these errors (although I did find a bug with new panels from global settings not using the global inset size). Edit: this inset bug is now fixed.
I know why you're getting that error ffcloud, but it shouldn't happen. Try clicking on the eePanel icon, then doing a profile->reset profile, and see if your problems are fixed.
Rebuild the UI and logged onto other char and tried to copy the other profile. Since then I'm having a lot of errors. Deleted the Saved Variables and am still getting errors. What I did was change some global settings. After that newly created panels are not visible in the 'panels' section.
Reset gives me the following error:
[2007/08/27 22:44:09-109-x8]: eePanels-2.0\core.lua:528: attempt to call method 'Hide' (a nil value)
eePanels-2.0\core.lua:256: in function <Interface\AddOns\eePanels\core.lua:256>
Dewdrop-2.0-46777 (DewdropLib):1181: in function `OnAccept'
Interface\FrameXML\StaticPopup.lua:2094: in function `StaticPopup_OnClick':
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Creating new panel from global settings throws the following error:
[2007/08/27 22:47:22-109-x1]: eePanels-2.0\core.lua:1450: attempt to concatenate field 'name' (a nil value)
eePanels-2.0\core.lua:566: in function `CreateMenus'
eePanels-2.0\core.lua:515: in function `CreatePanel'
eePanels-2.0\core.lua:208: in function `func'
Dewdrop-2.0-46777 (DewdropLib):710: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:649>
---
Left clicking on a panel which was created and throwing above error gives another error:
[2007/08/27 22:47:11-109-x1]: eePanels-2.0\core.lua:1631: Dewdrop-2.0: Bad argument #2 to `FeedAceOptionsTable' (table expected, got nil)
Ace2\AceLibrary\AceLibrary.lua:100: in function <Interface\AddOns\Ace2\AceLibrary\AceLibrary.lua:53>
(tail call): ?:
Dewdrop-2.0-46777 (DewdropLib):1262: in function `FeedAceOptionsTable'
eePanels-2.0\core.lua:1631: in function <Interface\AddOns\eePanels\core.lua:1631>
Dewdrop-2.0-46777 (DewdropLib):1872: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:1821>
Dewdrop-2.0-46777 (DewdropLib):2757: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:2716>
Dewdrop-2.0-46777 (DewdropLib):2973: in function `Open'
eePanels-2.0\core.lua:1628: in function `ShowPanelMenu'
eePanels-2.0\guideFrame.lua:67: in function `MouseDownListener'
eePanels-2.0\guideFrame.lua:51: in function <Interface\AddOns\eePanels\guideFrame.lua:51>
---
Hope that helps in finding some of the nasty bugs :)
Myproblem is when i Use for Example "Parent" PitBullUnitFrames3 After a Relogg i get this Messages.
[2007/08/27 22:43:58-124-x1]: eePanels-2.0\core.lua:1749: eePanel9:SetPoint(): Couldn't find region named 'PitBullUnitFrame3'
AceAddon-2.0-46764 (Ace2):927: in function <Interface\AddOns\Ace2\AceAddon-2.0\AceAddon-2.0.lua:920>
<in C code>: ?
AceEvent-2.0-44693 (Ace2):262: in function `TriggerEvent'
AceEvent-2.0-44693 (Ace2):955: in function <Interface\AddOns\Ace2\AceEvent-2.0\AceEvent-2.0.lua:948>
And
[2007/08/27 22:44:04-124-x1]: eePanels-2.0\core.lua:330: attempt to index local 'self' (a nil value)
AAAAAAAAAND
[2007/08/27 22:50:04-124-x1]: eePanels-2.0\guideFrame.lua:11: attempt to call method 'SetText' (a nil value)
eePanels-2.0\core.lua:1709: in function `ToggleLock'
eePanels-2.0\core.lua:1698: in function `ToggleLock'
eePanels-2.0\core.lua:1654: in function `OnClick'
FuBarPlugin-2.0-46984:937: in function <...\FuBarPlugin-2.0\FuBarPlugin-2.0\FuBarPlugin-2.0.lua:934>
FuBar-33424\FuBar.lua:1120: in function <Interface\AddOns\FuBar\FuBar.lua:1118>
Last One
[2007/08/27 22:53:49-124-x1]: eePanels-2.0\core.lua:1706: attempt to call method 'Hide' (a nil value)
eePanels-2.0\core.lua:1698: in function `ToggleLock'
eePanels-2.0\core.lua:1654: in function `OnClick'
FuBarPlugin-2.0-46984:937: in function <...\FuBarPlugin-2.0\FuBarPlugin-2.0\FuBarPlugin-2.0.lua:934>
FuBar-33424\FuBar.lua:1120: in function <Interface\AddOns\FuBar\FuBar.lua:1118>
And a few Errors but they are allready Posted before ;)
Myproblem is when i Use for Example "Parent" PitBullUnitFrames3 After a Relogg i get this Messages.
<blah>
QFT, having the same problem here. I'm using PitBullUnitFrame1 (and 5. Player and Focus at this time).
The funny side is... on the "old" eePanels there were no problems with this frames (tried to rebuild my old UI
[2007/08/27 22:54:36-291-x1]: eePanels-2.0\core.lua:1749: eePanel4:SetPoint(): Couldn't find region named 'PitBullUnitFrame1'
AceAddon-2.0-46764 (FuBar):927: in function <...face\AddOns\FuBar\libs\AceAddon-2.0\AceAddon-2.0.lua:920>
<in C code>: ?
AceEvent-2.0-44693 (FuBar):262: in function `TriggerEvent'
AceEvent-2.0-44693 (FuBar):955: in function <...face\AddOns\FuBar\libs\AceEvent-2.0\AceEvent-2.0.lua:948>
---
and
[2007/08/27 22:54:43-291-x1]: eePanels-2.0\core.lua:330: attempt to index local 'self' (a nil value)
---
The "Anchor"-feature is great. Hoping for a fast bugfix to the upper bug.
Ok, changed your eePanels.lua file in your saved variables folder to eePanels2.lua, deleted your eePanels folder, and install eePanels2.
You might want to wait a few minutes before you do this for the new changes to be uploaded and zipped. Sorry about all this confusion too, I just didn't anticipate many problems with the change.
Ok iam looking forward all the other Panels are fine...Only the Panels with the Parent to a Unitframe are not shown but thats not Big Deal i think i can wait :) Ill give you the best feedback i can when u Change something.
I've just pushed a fix for the pitbull/parenting errors everyone was getting.
Note: if a panel doesn't seem to appear when you change it's parent, it might be because the parent is covering it up. In eePanels1 there was a bug making the panel always appear overtop of its parent even though its level was set to 0. Now that that's fixed, you might not be able to see the panel until you resize it.
Changes:
- Major rewrite; less bloat, cleaner
- Embedded waterfall menu; shift-click on eePanel icon to open
- All panel options now available in Global Settings
- Individual panel locking; lock/unlock all panels through global options
- Ability to move/resize panels not parented to UIParent
- Individual panel dewdrop menus; right-click on an unlocked panel to display
- Warning messages for when you should perform a /reload
- Changing profiles no longer requires a /reload for the panels to appear
- Global Settings panel filters implemented; only change certain panel's settings
- User-supplied lua scripts; ability to add your own lua scripts to perform non-native tasks, etc.
- Support for panel anchoring
- Copy & Paste functionality
Losses
- Old layouts incompatible
- Translation files outdated; removing all but English until some friendly people can resupply new versions
Links:
- eePanels2 download
- eePanels2 Wiki
- eePanels2 Script Wiki (Thanks Seerah)
- eePanels1 thread (locked)
- eePanels1 download
- eePanels1 Wiki
One of the features added is the ability to attach lua scripts to a panel. Your scripts have full access to everything, so be careful when using it. Even though the scripts are tied into the saved variables for a panel, they are free to modify or access other panels, or anything else you want to. The scripts are attached to the panels for two reasons:
1) If you delete a panel, the script attached to it will be deleted as well. This helps when redistributing layouts
2) If you use the word THIS (in all caps) in a script, it will be replaced with the name of the panel the script is attached to. This makes it easy to come up with code which you can share with others.
Unfortunately, I can't get non-ace2 event hooks to work. I think it's because the normal WoW API requires OnEvent scripts to be set when the addon is loaded,which I don't do. Thus, if you want to register events you'll need to do so through the ACE2 event handling system. This part of the code might change if I can divine a better way to handle scripts. If you need to modify multiple frames on the same event, I would suggest creating a new frame, setting it's alpha to 0, and using it to hold all your scripts.
Please feel free to share any scripts you come up with, as I'm sure others will appreciate it. Here's one to get you started (pilfered from here).
Make an eePanel show when in a raid, and hide when not:
Make an eePanel resize when another frame (ChatFrame1 in this example) is resized. Note: This requires AceHook to be loaded, which isn't included with eePanels2:
Show a panel in combat, hide when out:
When you say less bloat, do you have any particular numbers? As it took me a fair amount of time to tweak the layout I have (and no doubt took the original author more time to create it in the first place), I don't want to upgrade just yet unless we're talking very significant values.
I can certainly see a lot of uses for the script embedding though! Mayhaps another thread or wiki page for useful scripts might be appearing soon?
A lot of redundant and sloppy code was removed. For instance, there used to be one ace option table for the global panel, and one for the individual panels. These have been consolidated, and saved 350-ish lines of code while improving consistency between the menus.
However, the new version is slightly larger (only a few kb) because of the new features.
Out of curiosity, why are you not releasing this major rewrite as eePanels2? I reckon a lot of folks who don't read these forums will be pretty upset when they update via the WoWAceUpdater only to find their entire setup erased. Having the rewrite as a separate mod would let people update as the stability & functionality is proven superior.
[2007/08/27 15:56:19-343-x1]: eePanels-2.0\core.lua:1824: attempt to perform arithmetic on field 'l' (a nil value)
AceAddon-2.0-46764 (Ace2):927: in function <Interface\AddOns\Ace2\AceAddon-2.0\AceAddon-2.0.lua:920>
<in C code>: ?
AceEvent-2.0-44693 (Ace2):262: in function `TriggerEvent'
AceEvent-2.0-44693 (Ace2):955: in function <Interface\AddOns\Ace2\AceEvent-2.0\AceEvent-2.0.lua:948>
---
I know why you're getting that error ffcloud, but it shouldn't happen. Try clicking on the eePanel icon, then doing a profile->reset profile, and see if your problems are fixed.
Reset gives me the following error:
[2007/08/27 22:44:09-109-x8]: eePanels-2.0\core.lua:528: attempt to call method 'Hide' (a nil value)
eePanels-2.0\core.lua:256: in function <Interface\AddOns\eePanels\core.lua:256>
Dewdrop-2.0-46777 (DewdropLib):1181: in function `OnAccept'
Interface\FrameXML\StaticPopup.lua:2094: in function `StaticPopup_OnClick':
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Creating new panel from global settings throws the following error:
[2007/08/27 22:47:22-109-x1]: eePanels-2.0\core.lua:1450: attempt to concatenate field 'name' (a nil value)
eePanels-2.0\core.lua:566: in function `CreateMenus'
eePanels-2.0\core.lua:515: in function `CreatePanel'
eePanels-2.0\core.lua:208: in function `func'
Dewdrop-2.0-46777 (DewdropLib):710: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:649>
---
Left clicking on a panel which was created and throwing above error gives another error:
[2007/08/27 22:47:11-109-x1]: eePanels-2.0\core.lua:1631: Dewdrop-2.0: Bad argument #2 to `FeedAceOptionsTable' (table expected, got nil)
Ace2\AceLibrary\AceLibrary.lua:100: in function <Interface\AddOns\Ace2\AceLibrary\AceLibrary.lua:53>
(tail call): ?:
Dewdrop-2.0-46777 (DewdropLib):1262: in function `FeedAceOptionsTable'
eePanels-2.0\core.lua:1631: in function <Interface\AddOns\eePanels\core.lua:1631>
Dewdrop-2.0-46777 (DewdropLib):1872: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:1821>
Dewdrop-2.0-46777 (DewdropLib):2757: in function <...erface\AddOns\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua:2716>
Dewdrop-2.0-46777 (DewdropLib):2973: in function `Open'
eePanels-2.0\core.lua:1628: in function `ShowPanelMenu'
eePanels-2.0\guideFrame.lua:67: in function `MouseDownListener'
eePanels-2.0\guideFrame.lua:51: in function <Interface\AddOns\eePanels\guideFrame.lua:51>
---
Hope that helps in finding some of the nasty bugs :)
Nice work i like the new Things in ee BUT!
Myproblem is when i Use for Example "Parent" PitBullUnitFrames3 After a Relogg i get this Messages.
And
AAAAAAAAAND
Last One
And a few Errors but they are allready Posted before ;)
QFT, having the same problem here. I'm using PitBullUnitFrame1 (and 5. Player and Focus at this time).
The funny side is... on the "old" eePanels there were no problems with this frames (tried to rebuild my old UI
and
The "Anchor"-feature is great. Hoping for a fast bugfix to the upper bug.
Hm ok but u still work on eePanels2? u do or?
You might want to wait a few minutes before you do this for the new changes to be uploaded and zipped. Sorry about all this confusion too, I just didn't anticipate many problems with the change.
Note: if a panel doesn't seem to appear when you change it's parent, it might be because the parent is covering it up. In eePanels1 there was a bug making the panel always appear overtop of its parent even though its level was set to 0. Now that that's fixed, you might not be able to see the panel until you resize it.
Nice work keep it up...
Thank you for the fast Bugfix.
/bow
and good night :)