Download
(23 Kb)
Download
Updated: 07-25-10 03:35 AM
Pictures
File Info
Updated:07-25-10 03:35 AM
Created:05-13-10 05:50 AM
Downloads:3,649
Favorites:10
MD5:
gLib2
Version: 2.442
by: Goldpaw [More]
What is this?

gLib2 is a function library. It doesn't do anything by itself, but provides a set of very useful functions for the addon environment. It includes no textures or graphics, so the memory usage is minimal, and it has no running processes or re-occurring event calls, so the CPU time used is 0 when idle.

gLib is specifically designed to be a part of the full UI package gUI, and provides functionality specifically used by most of the addons included in it, but has been written to allow any other addon to use it's functionality as well.


Where is the documentation?

It's a work in progress. More info soon.
2.442
- Further expanded the tag database

2.441
- Added "Lib: " to the .toc visible name

2.44
- Added new tags for short and smart display of time and values

2.43
- Fixed a bug with the :Slash() function causing several addons to register slash commands under the same names

2.42
- Slightly modified how the task scheduler works

2.41
- Removed str:split(), this function already exists in WoW! /doh....

2.4
- New functionality for addons, as gLib now handles events and scheduled tasks
- New addon creation functions:
addon = gLib:newAddon( name ) -- creates a new addon. This is NOT a frame, but a table!
addon:OnInit() -- called upon ADDON_LOADED
addon:OnEnable() -- called upon PLAYER_LOGIN
addon:OnDisable() -- called upon PLAYER_LOGOUT
addon:RegisterEvent( event[, func] ) -- register an event for this addon with gLib's event handler
addon:RegisterEvents() -- register multiple events
addon:Schedule( task[, interval] ) -- schedules the function <task> to be called every 0.1 <= interval <= 999 or 0.5 seconds
newclass = addon:newClass( name, parentClass ) -- creates a new class <name> which inherits from <parentClass>
- New API calls added for frames, fontstrings and textures:
:Place(point[, anchor[, relativepoint[, offset x, offset y]]]) -- as SetPoint, but also ClearAllPoints() for you
:Size(width[, height]) -- height = width if height is omitted
- New api calls for strings:
str:tag() -- replaces select tags in the given string; string.tag("[tagname:arg1,arg2,etc]")
str:split( separator ) -- splits a string into a table of substrings based on a separator
- Removed:
:Coin() -- string.tag("[money]") replaces it.

2.3
- Unreleased, reverted

2.2
- Upgraded the :Coin() function further
- Removed all libraries, kept the shortcuts for backwards compability
- Now embeds all functions into created addons (Except :New(), :AddLocale() and :FetchLocale())

2.01
- Now supports embedding into other addons

2.0
- Rewrite of the original gLib. Fully backwards compatible.
- DropDown menus are now supported in the gLib.Menu:CreateOptionsPanel() function
- Menu options are now sorted by their key/index

1.11
- Added a fail-safe to counter some SetPoint errors

1.1
- Added a replacement function for the default OnUpdate timers

1.02
- Now unregisters functions and events no longer needed

1.01
- Changed the manner of a fail-check in gLib:CreateCheckButton() and gLib:CreateText()

1.0
- Release version
Optional Files (0)


Archived Files (6)
File Name
Version
Size
Author
Date
2.44
22kB
Goldpaw
07-14-10 02:22 AM
2.43
22kB
Goldpaw
07-12-10 09:12 AM
2.41
15kB
Goldpaw
06-09-10 05:10 PM
2.4
15kB
Goldpaw
06-09-10 04:13 PM
2.01
12kB
Goldpaw
05-13-10 10:49 AM
2.0
12kB
Goldpaw
05-13-10 05:50 AM


Post A Reply Comment Options
Old 11-06-10, 02:35 AM  
Goldpaw
A Cyclonian
 
Goldpaw's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 296
Uploads: 21
Re: Update to match curse?

Originally posted by markhr
Will your g*.* (lib, media, buff, etc.) files be updated to match curse?
Probably won't, no.
By glancing through your error list, most of it should be fixed btw. On Curse.
Goldpaw is offline Report comment to moderator  
Reply With Quote
Old 11-01-10, 10:52 AM  
markhr
A Fallenroot Satyr

Forum posts: 23
File comments: 44
Uploads: 0
Update to match curse?

Will your g*.* (lib, media, buff, etc.) files be updated to match curse?

Also, as I can't login to curse anymore (they've stopped supporting IE as a browser ) here're are a bunch of errors:

Date: 2010-11-01 14:54:43
ID: -1
Error occured in: Global
Count: 6
Message: C stack overflow
Debug:
[C]: ?
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
...
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
Titan\TitanMovable.lua:171: TitanMovableFrame_MoveFrames()
Titan\TitanPanel.lua:1923: TitanPanelBarButton_TogglePosition()
Titan\TitanPanel.lua:1991: TitanPanelBarButton_DisplayBarsWanted()
Titan\TitanPanel.lua:2185: TitanPanel_InitPanelButtons()
Titan\TitanPanel.lua:1371: ?()
Titan\TitanPanel.lua:1246:
Titan\TitanPanel.lua:1245
AddOns:
Swatter, v5.8.4723 (CreepyKangaroo)
Ace3, v
AFKTracker, v
Align, v
AtlasLoot, vv5.11.07
AtlasLootBurningCrusade, vv5.11.07
AtlasLootCrafting, vv5.11.07
AtlasLootOriginalWoW, vv5.11.07
AtlasLootWorldEvents, vv5.11.07
AtlasLootWrathoftheLichKing, vv5.11.07
AtlasLootFu, vv5.11.07
Auctionator, v2.6.8
BadBoy, v6.154
BadBoyCCleaner, v3.12
BadBoyLevels, v2.75
Bagnon, v2.14.0
BagnonForever, v1.1.2
BagnonTooltips, v
BGDefender, v1.5.2
BlizzMove, vv1.1.1
Capping, v4.0.002
DBMBurningCrusade, v
DBMCore, v
DHUD3, v3.0
DoomCooldownPulse, v
EveryQuest, v2.3r163-beta
GatherMate2, v1.0.1
gbuff, v1.0
GCDRing, vb1.53
GFWFeedOMatic, v4.0
gLib, v2.6
gMedia, v2.4
GoingPriceAllakhazam, v4.0.1288370194
GoingPriceWowhead, v4.0.1288536518
gPanel, v1.2
GryphonsRemover, vv4.0
HealersHaveToDie, v1.5.2
HudMap, v
Levelland, v
LevelRange, v4.0.00
LightHeaded, v316
MailOpener, vv1.2.9
Mappy, v3.0.1
Omen, v3.0.11
Postal, v3.4.4
Prat30, v3.4.10
Prat30HighCPUUsageModules, v
Prat30Libraries, v
PreformAVEnabler, v2.6
Recount, v
Routes, vv1.3.0
Scrap, v
SwindlerPreventer, v4.0.1a
TidyPlates, v5.13.6 (R39)
TidyPlatesGrey, v
TinyFocusMover, vr4
TipTop, v2.6
Titan, v4.3.9.40000 - Revision 386
TitanBag, v4.3.9.40000
TitanClock, v4.3.9.40000
TitanCoords, v4.3.9.40000
TitanGoldTracker, v4.3.9.40000
TitanLootType, v4.3.9.40000
TitanPerformance, v4.3.9.40000
TitanRecZone, v3.0.8
TitanRepair, v4.3.9.40000
TitanRestPlus, v4.0.1
TitanSpec, v1.7.3.1.40000
TitanXP, v4.3.9.40000
TotemTimers, v10.3.6
VanasKoS, v4.26-$Rev: 482 $
BlizRuntimeLib_enUS v4.0.1.40000 <eu>
(ck=698)

Date: 2010-11-01 14:28:27
ID: -4
Error occured in: Global
Count: 1
Message: C stack overflow
Debug:
[C]: ?
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
...
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
gLib\gLib.lua:238: Place()
gbuff\gBuff.lua:289:
gbuff\gBuff.lua:289
[C]: SetPoint()
Mappy\Mappy.lua:1817: ReanchorBuffFrame()
Mappy\Mappy.lua:301: Function()
Mappy\MC2SchedulerLib.lua:242: OnUpdate2()
Mappy\MC2SchedulerLib.lua:178: OnUpdate()
Mappy\MC2SchedulerLib.lua:20:
Mappy\MC2SchedulerLib.lua:20
AddOns:
Swatter, v5.8.4723 (CreepyKangaroo)
Ace3, v
AFKTracker, v
Align, v
AtlasLoot, vv5.11.07
AtlasLootBurningCrusade, vv5.11.07
AtlasLootCrafting, vv5.11.07
AtlasLootOriginalWoW, vv5.11.07
AtlasLootWorldEvents, vv5.11.07
AtlasLootWrathoftheLichKing, vv5.11.07
AtlasLootFu, vv5.11.07
Auctionator, v2.6.8
BadBoy, v6.154
BadBoyCCleaner, v3.12
BadBoyLevels, v2.75
Bagnon, v2.14.0
BagnonForever, v1.1.2
BagnonTooltips, v
BGDefender, v1.5.2
BlizzMove, vv1.1.1
Capping, v4.0.002
DBMBurningCrusade, v
DBMCore, v
DHUD3, v3.0
DoomCooldownPulse, v
EveryQuest, v2.3r163-beta
GatherMate2, v1.0.1
gbuff, v1.0
GCDRing, vb1.53
GFWFeedOMatic, v4.0
gLib, v2.6
gMedia, v2.4
GoingPriceAllakhazam, v4.0.1288370194
GoingPriceWowhead, v4.0.1288536518
gPanel, v1.2
GryphonsRemover, vv4.0
HealersHaveToDie, v1.5.2
HudMap, v
Levelland, v
LevelRange, v4.0.00
LightHeaded, v316
MailOpener, vv1.2.9
Mappy, v3.0.1
Omen, v3.0.11
Postal, v3.4.4
Prat30, v3.4.10
Prat30HighCPUUsageModules, v
Prat30Libraries, v
PreformAVEnabler, v2.6
Recount, v
Routes, vv1.3.0
Scrap, v
SwindlerPreventer, v4.0.1a
TidyPlates, v5.13.6 (R39)
TidyPlatesGrey, v
TinyFocusMover, vr4
TipTop, v2.6
TotemTimers, v10.3.6
VanasKoS, v4.26-$Rev: 482 $
BlizRuntimeLib_enUS v4.0.1.40000 <eu>
(ck=544)
markhr is offline Report comment to moderator  
Reply With Quote
Old 05-13-10, 10:12 AM  
Goldpaw
A Cyclonian
 
Goldpaw's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 296
Uploads: 21
Originally posted by Lonny
Hello, I'm not using your UI but I just thought to give you some ideas on how you can improve things and maybe make it more efficient.

You already created a frame in your library, you can have one event handler to handle all your addons events, you don't need to set an event handler per addon.

This will require some events management functionality.

Most of the time formats are already handed to you with the built-in methods date(format), time(format) so maybe you can use these instead.

Currently when you want to create a timer, you make a new handler for the provided frame, you can reuse the same frame you created in your library, and have a scheduler that prioritize the execution by certain time frame, there are few algorithms you can use to do so, such as the Binary heap, you can search in google the following words "priority queue time heap lua wow" and see what you get.

You can define all your tables at the top locally, and at the end reference them to 'gLib'.

Best Regards!
Thanks for the good ideas. I'll definitely look into them.
__________________
http://www.friendlydruid.com/
Goldpaw is offline Report comment to moderator  
Reply With Quote
Old 05-13-10, 09:27 AM  
Lonny
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Hello, I'm not using your UI but I just thought to give you some ideas on how you can improve things and maybe make it more efficient.

You already created a frame in your library, you can have one event handler to handle all your addons events, you don't need to set an event handler per addon.

This will require some events management functionality.

Most of the time formats are already handed to you with the built-in methods date(format), time(format) so maybe you can use these instead.

Currently when you want to create a timer, you make a new handler for the provided frame, you can reuse the same frame you created in your library, and have a scheduler that prioritize the execution by certain time frame, there are few algorithms you can use to do so, such as the Binary heap, you can search in google the following words "priority queue time heap lua wow" and see what you get.

You can define all your tables at the top locally, and at the end reference them to 'gLib'.

Best Regards!
Last edited by : 05-13-10 at 09:31 AM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.