The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Clicking events in with:Style

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Clicking events in with:Style Posted: Oct 5, 2003 3:26 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Clicking events in with:Style
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

The other day I was responding to questions about firing off actions using with:Style. One of the things I said was that you could not yet use the <script language="smalltalk"> logic. Well, that has now changed. It didn't take much work, but the current development version of with:Style now supports scripts being fired by XML-Events. This looks roughly like this:

<html
	xmlns="http://www.w3.org/2002/06/xhtml2"
	xmlns:ev="http://www.w3.org/2001/xml-events">
	<head>
		<script id="helloworld" language="Smalltalk">
			| temporaryVariable |
			temporaryVariable := (this wsAttributeAt: ''message'') value.
			Dialog warn: temporaryVariable.
		</script>
	</head>
	<body>
		<span ev:type="click" ev:handler="#helloworld" message="Hello!">Click me</span>
	</body>
</html>

Take note of the 'this' variable. That this gives you access to the node that spawned the event! :)

Read: Clicking events in with:Style

Topic: SCO widens the fight Previous Topic   Next Topic Topic: Heck of a game

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use