SymRAD S60 9.1 3rd Alpha1
SymRAD S60 Alpha1 This release is for the Nokia S60 3rd Edition. It allows you to create a SymRAD application by editing just one file (SymRAD.xml) in c:\data\others.
During installation, you will get a message asking whether you allow the application to 'use the network or make calls'. This is because the program pre-declares itself as using the network (for possible http requests you might want to program - see below). The program will never make calls (and I don't know why Nokia even display this message as it's misleading).
Please contact me at support@simonjudge.com with any bugs or suggestions (particularly for new native calls). I am also interested in seeing any applications you produce.
The installed SymRAD.xml is a simple expression evaluation calculator...
function init()
{
}
function calculate()
{
results = eval(equation).toString()
showScreen("resultscreen")
}
function goBack()
{
showScreen("mainscreen")
}
This creates an application with two screens. The first contains two controls, a label telling the user what to do and edit box for the user to type an equation. The first also contains an 'ok' menu item which calls calculate() when the user selects it. The second screen contains a label into which the evaluation is placed when calculate() is called.



The javascript section contains all the functions and can contain any valid javascript. The init() function must always be present (even if it's empty) and can be used to set up data prior to the program running. It's possible to swap between screens using the showScreen() function.
You can edit the SymRAD.xml in c:\data\others to change the program functionality. How can you do this? Well, the easiest way is to use bluetooth on your PC/laptop to browse to the directory on the phone. Drag and drop the SymRAD.xml to update the file...

Nokia E61 users with QWERTY keyboards may choose to edit the file on their phone!
Interim Documentation...
Supported Controls
label
edit
numericedit
editread (A full screen read only text control)
choice (populate with string with | to separate items)
button
The x, y, w and h position/sizes the controls.
Menu
Menu options usually appear under Options and change as the user swaps between screens. Exit is always available.
Native Calls
openFile(filename) Opens file in the current (private) directory
createFile(filename) Creates a new file in the current (private) directory
writeFile(text) Writes text to the currently open file
readFile(text) Reads text from the currently open file
seekFile(position) Seek to position within file
deleteFile(filename) Deletes the file in the current (private) directory
closeFile() Closes the currently opened file
httpRequest(url, GET or POST) Fetch data from internet. Includes busy, cancel etc
showScreen(name) Switch to another screen
alert(text) Show an alert. This is useful for debugging as well as alerting the user
Sample Code
Function to pre-load a file into a string before program starts...
function init()
{
// Pre load file
var ret = openFile("file.dat")
if (ret != "ERROR")
{
var dataRead = readFile()
index = index + dataRead
while (dataRead != "")
{
dataRead = readFile()
index = index + dataRead
}
closeFile()
}
else
{
alert("Unable to open file")
}
} Functions to load and save settings... function loadSetting(name)
{
var value = ""
var ret = openFile(name + ".bin")
if (ret != "ERROR") // Not created yet?
{
value = readFile()
closeFile()
}
return value
}
function saveSetting(name, value)
{
deleteFile(name + ".bin")
createFile(name + ".bin")
writeFile(value)
closeFile()
}
Simple application to fetch a web page and display the first 100 characters...
function init()
{
}
function getsite()
{
results=httpRequest("http://simonjudge.com", "GET").substring(0, 100)
showScreen("resultscreen")
}
function goBack()
{
showScreen("mainscreen")
}
Populating a choice...
or programmatically...
selection = "one|two|three"
The 3 screens from S60 Dictionary...
Pre loading large index file during init() to speed up lookups S60 Dictionary...
function init()
{
// Pre load index
var ret = openFile("Dictionary.ind")
if (ret != "ERROR")
{
var dataRead = readFile()
index = index + dataRead
while (dataRead != "")
{
dataRead = readFile()
index = index + dataRead
}
closeFile()
}
else
{
alert("Unable to load dictionary index")
}
}
Known Problems/limitations
- When there's only one control in a screen, the down key sometimes exits the program
- It's not currently possible to read/write to files outside the private directory
- It's only possible to have one SymRAD file and hence one application (at the moment)
Development Status >>
if u liked my post dont forget to hit
button

















