-
Notifications
You must be signed in to change notification settings - Fork 0
Shared data does not work if immutable #4
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
If there is shared data in a plugin type, the items in the dictionary are just added as attributes to the plugins.
If a plugin overwrites this attribute, the item in the dictionary does not change.
Possible solution:
- Add a Data class (or maybe DataHolder)
- every plugin type can support multiple Data instances
In a plugin you could use:
self.data.some_var = "Foo"
self.data2.other_var = "Other value"In the application you could use:
data = scarabaeus.Data()
data2 = scarabaeus.Data()
data.some_var = "Bar"
data2.other_var = "Some value"
plugin_type = scarabaeus.PluginType("Plugin", [data, data2], "plugins/")
plugin_type.load_all()
print(data.some_var, data2.other_var) # Foo, Other valueReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request