Mercurial > libervia-backend
comparison frontends/src/wix/param.py @ 759:93bd868b8fb6
backend, frontends: callbacks refactoring:
- launchAction is now async, and return a dictionary for its result
- no more action_id, actionResult* are deprecated
- callback system is about to be unified
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 24 Dec 2013 15:19:08 +0100 |
parents | 49587e170f53 |
children | bfabeedbf32e |
comparison
equal
deleted
inserted
replaced
758:86224a13cc1d | 759:93bd868b8fb6 |
---|---|
127 def onButtonClicked(self, event): | 127 def onButtonClicked(self, event): |
128 """Called when a button paramater is modified""" | 128 """Called when a button paramater is modified""" |
129 self.__save_parameters() | 129 self.__save_parameters() |
130 name, category = event.GetEventObject().param_id | 130 name, category = event.GetEventObject().param_id |
131 callback_id = event.GetEventObject().callback_id | 131 callback_id = event.GetEventObject().callback_id |
132 data = {"name":name, "category":category, "callback_id":callback_id} | 132 self.host.launchAction(callback_id, None, profile_key = self.host.profile) |
133 id = self.host.bridge.launchAction("button", data, profile_key = self.host.profile) | |
134 self.host.current_action_ids.add(id) | |
135 event.Skip() | 133 event.Skip() |
136 | 134 |
137 def __save_parameters(self): | 135 def __save_parameters(self): |
138 for param in self.modified: | 136 for param in self.modified: |
139 self.host.bridge.setParam(param[0], self.modified[param], param[1], | 137 self.host.bridge.setParam(param[0], self.modified[param], param[1], |