Hi Katja, On Mon, 22 Sep 2008 12:52:13 +0200, Katja Suess wrote:
> Hi! > can i use triggerEvent in a kss action? it says that triggerEvent is > a global command. globalcommands = self.getCommandSet('global') > globalcommands.triggerEvent('click', '#article-refresh') is not what i > need. > So how to do that? Kss was designed in a way to support event triggering, including the use case you mention. To support event propagation is an important need for complex kss application, and it is obviously needed for writing custom event plugins and also in other use cases where some client state is involved. However by the time we wrote triggerEvent / continueEvent, we had only an example (conceptual) use case to test it on. For this reason they don't work as expected and altogether they have limitations. In the last period, I was working on different use cases where a correct event propagation was needed. I was also contacted by more developers about the same problem (the need for triggering), an although I was trying to give solutions and workarounds, the conclusion was always the same: event triggering must be supported in a coherent way both on the level of the kss syntax and on the programmatic (javascript) API. My plan is, as my time permits, to provide a transitional kss plugin, that can be used on top of existing kss. This would provide the event triggering in the way I found most powerful and easy to use, based on the use cases I'm working with and on the requests arrived to me. This will enable event triggering to be carried out by using kss actions in the stylesheet. If developers find this usable and they agree that this is the correct solution for their various use cases, this can be integrated to kss core at a later point which would result in a clean definition of the kss syntax and api for event triggering. But even with the transitional plugin you'd have access to the same functionality with the tradeoff of a little longer syntax. Which means you have to be patient at the moment. In case you happen to participate the kss sprint in Washington DC, I am more then glad to give you more information about this. Best wishes, -- Balazs Ree _______________________________________________ Kss-devel mailing list Kss-devel@codespeak.net http://codespeak.net/mailman/listinfo/kss-devel