Hecl Builder

Easy Mobile Applications

test2
Download: .jad .jar
no rating Average rating:

MIDP Version: 1.0
Description:
Last updated: Mon Oct 06 02:25:05 +0000 2008 by jasonknm

proc reverse {tf results} {
    set string [getprop $tf text]
    set newstring ""
    set i [slen $string]
    incr $i -1
    while {> $i -1} {
	set c [sindex $string $i]
	append $newstring $c
	incr $i -1
    }
    setprop $results text $newstring
}

set mainform [form label "Reverse a String" code {
    set tf [textfield label "String:"]
    set results [stringitem label "Results:"]
    cmd label "Reverse" code [list reverse $tf $results]
    cmd label "Exit" code exit type exit;
}]

setcurrent $mainform


Note: If you have trouble with the applets on this site, you might try upgrading your Jave Runtime Environment, in order to get the "Next-Generation Java Plug-In", available for download here: http://download.java.net/jdk6/