Home   Archive   Permalink

Alerting Variables

My understanding is that I can define a variable string like this :-
f: field "abcdefghijkl"
So why can't I alert that strting using alert f or alert f/text or alert to-string f or alert to-string f /text or any of the other possibilities. What am I failing to understand.
Even if I use S: to-string f I still can't get it to alert me the original string.

posted by:   Adrian     24-Mar-2013/8:42:30-7:00

Answered in topic "New Introductory Text and a Free Private REBOL Lesson", but something to be aware of here. You said "I can define a variable string like this f: field "abcdefghijkl"
In that code, you're assigned the word "f" to a field OBJECT containing a text property "abcdefghijkl". Try this:
R E B O L []
view layout [
     f: field "sadafasdf"
     btn "text property" [alert f/text]
     btn "object definition" [editor f]
In the editor, check out all the different properties (called "paths", or "refinements" in REBOL) which can be accessed using the "/" syntax (comparable to "." syntax in other languages).
Then, check out:
     help system
     help system/view/VID/vid-styles/field
Then run this script if you really want to explore REBOL:
     do http://www.rebol.it/romano/anamonitor300.r

posted by:   Nick     25-Mar-2013/8:19:01-7:00