I noticed after updating to r182 of Mobile Vault, the no-lib strip version installed ChatThrottleLib and LibCompress along with LibGuildBankComm-1.0. Since LGBC has no-lib disabled, isn't stripping LC and CTL redundant? And I'm sure someone will correct me, but I thought CTL should never be dis-embedded anyway.
Still testing few things, like the double fire of GUILDBANKFRAME_CLOSED.
In the fully packaged version of MGV I had to add the other libraries that LBGC requires since the pkgmeta file will only include the LGBC code. In order to get all the dependencies into my packaged version they had to be explicitly added. That then makes the Curse Client download them separately even though the standalone version of LGBC has them included.
Double fire of _CLOSED events can be fixed by ignoring the second time it happens.
Generally, the easiest is to register for the _OPENED event and unregister the _CLOSED event when you receive a _CLOSED event. Similarly, register for the _CLOSED event during the _OPENED event. You don't have to unregister the _OPENED event (and you shouldn't at all) because it can fire again if the user reopens said frame (mail/bank/guildbank) without the _CLOSED firing by clicking on it again.
Looks like Starinnia has been industrious; big improvements are coming beyond my proof of concept. I will try to keep this thread updated.
r26 | starinnia | 2011-04-06 01:35:03 +0000 (Wed, 06 Apr 2011) | 8 lines
M /trunk/LibGuildBankComm-1.0.lua -Large commit of doom
-Split catch-all callback into 3: items, money, tabs
-remove parameters from PlayerGuildless callback
-refactor some of the comms code
-fix the lib not processing info requests
-fix some guild events that don't have parameters expecting one
-make the guildBank table private to the lib, access is given through accessors and iterator functions
-lib should be a bit more author friendly now, updated API docs coming soon
Well, I was extra productive and worked on it some more using a friend's account and my bank guild.
I was able to fix serialization and compression related errors that resulted from the data never being encoded for transmission over the addon channel (it blew up and crashed the client the first time it tried to sync).
I also fixed the spamming of data requests during login. And while fixing that issue got it to stop sending a request for data when the player logs out. The spam of "No player named 'Upvalue' is online" was very annoying. Unfortunately I think guilds with small banks (3 or fewer tabs) may still have issues since the fix relies on timing of comm messages. I plan to look into it further, but it's 2am in Chicago and I should prolly stop now before I start committing very odd code...