Thread Tools Display Modes
05/19/14, 10:01 AM   #1
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Saved Variables and embedded Libraries

Several Libraries are designed to be either installed stand alone into the addon folder, or be embedded into other addons. LibStub will deal with only getting the most recent version.

If a embeded libraries tries to store/access saved variables, what will happen?
There is no addon name (no need for a manifest with embedded lirbaries) to store it under. Would they end up in the Saved Var files of the addon they are emedded too? Would they get a deny?
  Reply With Quote
05/19/14, 08:45 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Really, libraries shouldn't need saved variables.
  Reply With Quote
05/19/14, 11:45 PM   #3
Wobin
 
Wobin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 78
What Seerah said.

But the only way for an embedded library (which is just another .lua file in your addon) to access a SV file, is through the addon itself.

And that wouldn't necessarily work, unless you used a common name (which brings about its own issues), as -anyone- could be using your library.

You can use your addon's SV details to modify the -output- from the library, but you shouldn't directly affect it.

Last edited by Wobin : 05/19/14 at 11:49 PM.
  Reply With Quote
05/20/14, 04:49 AM   #4
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by Seerah View Post
Really, libraries shouldn't need saved variables.
We have so many addons that solve cross discovery of Character data - like what each Character has in thier Inventory or wich traits are researched.
I was thinking about making one Library that collects all this data and stores it for other addons to use, so the other ones only have to deal with presentation of the data (not also collecting it wich might involve collecting the same data more then once and might oversubscribe events).

I got the strong feeling that in order to work this could not be an embedded Library and this piece of information confirms it.
But with DependsOn one could still use the library as data source (and force that it has to be installed).
  Reply With Quote
05/20/14, 04:00 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
What you are looking at creating is more of a data store addon, with an open API for other addons to access its data. As you already said, it must be installed standalone.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Saved Variables and embedded Libraries


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

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