That's a possibility, though I do have an <Event> XML element planned which allows you to specify an Event name and the name of a script function to execute.
Example:
Code: Select all
<Window Type="TaharezLook/Button" Name="QuitButton>
<Property Name="Position" Value="x:0.5 y:0.5" />
<Property Name="Size" Value="w:0.1 h:0.1" />
<Property Name="Text" Value="Quit!" />
.
.
.
<Event Name="Clicked" Function="quitClicked" />
</Window>
This obviously would make use of the ScriptModule interface, so you'd have to write something to support that (very easily done, if you've not done it already, I can advise if required).
If you like the Event idea, I'll bump it up the TODO list and get it in over the coming weekend.
CE.