Netscape and ActiveState To Cooperate on Development
Wednesday May 24th, 2000
Wednesday May 24th, 2000 2:55 PM
You are replying to this message
This sounds great so far. I've always liked how you can use just about any language with IE and all that automation stuff, however flawed an implementation and insecure some may feel that it is.
I'm wondering how they will go about allowing multiple scripting languages for event handlers. One nice way I've seen is in Prototype:
Click on the Scripting link in the frame.
You'll notice this code looks a lot like XUL, but instead of embedding code into an attribute, they use a tag that has attributes to signify the target language:
<?xml version="1.0" ?> <!DOCTYPE Window SYSTEM "proto.dtd"> <Window Id="App1" Title="Hello World" Width="200" Height="120"> <Panel id="p1"> <Text Id="Text1" Pos="10,10,170,20"></Text> <Button Id="But1" Pos="45,45,105,30" Caption="Press Here!"> <!-- the setText is a method available for the target object, in this case a JTextField from the JFC. This method can be any method of this class or from one of the superclass of this object. See Bean notes below --> <onMouse Event="Clicked" Target="Text1" Language="BEAN"> <script>setText("Hello World") </script> </onMouse> </Button> </Panel> </Window>
He gives examples of TCL, Python, and use of JavaBeans as well on that page.