digideskio / zotonic

Automatically exported from code.google.com/p/zotonic
0 stars 0 forks source link

Config changes should trigger events #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If I read the code correctly, if a user changes a config value, nothing 
happens. The only way a module can get new/updated values is if the user 
deactivates the module and then activates it again.

The config section should generate events when a value is added/changed/deleted.

This event could be cast directly to the module whose config has changed.

Original issue reported on code.google.com by dmitr...@gmail.com on 27 Jun 2011 at 12:40

GoogleCodeExporter commented 8 years ago
That's a good addition indeed, seems logical.

What about:

observe_config_insert/2
observe_config_update/2
observe_config_delete/2

all with events with event {_, key, value}

Original comment by scherpenisse on 27 Jun 2011 at 4:39

GoogleCodeExporter commented 8 years ago
Perhaps the config_update event could be {_, key, old_value, new_value}?

I am not entirely sure this is really needed, because for my own purposes just 
value would be more than enough.

Original comment by dmitr...@gmail.com on 27 Jun 2011 at 6:29

GoogleCodeExporter commented 8 years ago
The signals are:

{m_config_update, Module, Key, Value} for updates/inserts;

{m_config_update_prop, Module, Key, Prop, PropValue} for "complex" property 
value updates/inserts

{m_config_update, Module, Key, undefined} for config deletes.

Original comment by scherpenisse on 21 Jul 2011 at 1:25

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 72cb992b928a.

Original comment by scherpenisse on 21 Jul 2011 at 1:25