Tuesday, May 18, 2010

Five sconds of REBOL - dialogs & functions

REBOL has a lot of built in functions and dialogs. I've already tried out "alert", but there are a lot more, like these:

request-pass
request-date
request-color
request-file

These functions has different options specified by the "/" symbol. For example "title".

request-pass/title "Logon to the secret chamber"

Also notice that they have return values. To make a simple question/answer dialog try the following:

name: request-text/title "What is thy name?"
alert (rejoin ["Hello there " name])

The return value of the reuqest-text function is stuffed into the variable "name" and shown in the alert using the "rejoin" function that simply concatenates text.

So remember, dialogs have options and variables are declared using the ":" symbol!






No comments:

Post a Comment