[OSX-Users] hypercard on the web

Leslie Carr lac at ecs.soton.ac.uk
Sun Nov 29 10:34:14 GMT 2009


I do an annual trawl for Hypercard implementations on the web (never give up, never surrender) and I have just found a brilliant implementation- TileStack.

My favourite features of TileStack:
- the HyperTalk-alike language is compiled into JavaScript and hence runs natively in browsers
- there is fantastic support for AJAX services via XML, JSON, RSS, HTML and TEXT

It's this latter feature that I've really been waiting for -  a simple way to make rich internet applications :-)

Example 1 (Twitter Data)
===================
on mouseUp
    put "foo" into q
    request "json" ("http://search.twitter.com/search.json?q=" & q) myCallback
end mouseUp

on myCallback yourData, error
    repeat with count = 1 to the number of items in the results of yourData
        put the created_at of item count of json into createdAt
        put the geo of item count of json into geo
        put the id of item count of json into id
        put the in_reply_to_screen_name of item count of json into inReplyToScreenName
        put the text of item count of json into text
        put the user of item count of json into user
        put text into eins
        put tile field id 17 into bisher
        put bisher & text & return & return into tile field id 17
     end repeat
end myCallback

Example 2 (Getting Flickr Images)
==========================
on mouseUp
    put "json" into format
    put "?" into jsoncallback
    request "json" ("http://api.flickr.com/services/feeds/photos_public.gne?format=" & format & "&jsoncallback=" & jsoncallback) flickrCallback
end mouseUp

on flickrCallback json, error
    set the icon of button "latestFlickrImage" to the m of the media of item 1 of the items of json
end flickrCallback


--
Les


More information about the Osx-users mailing list