Hi Matos,

>How can I know wich objects, variables and other things exist under an
>object?!

use and look at Bo's system browser (browse-system.r) which should be on
rebol.org. If you can't find it let me know off-list and I'll mail it to you.

In short, as Jan pointed out, you can access a block containing all the
words defined in an object using first object-name:

>> object: make object! [word-1: "this is word-1" word-2: "this is word-2"]
>> print mold first object
[self word-1 word-2]

Note that the first word in every object is self, which evaluates to the
object itself. When you inspect the object word by word you will want to
skip the first word, since you are interested in the words defined in the
object and not the complete object. You can use a loop like this:

foreach word next first object [
  print [
   mold word
   mold get in object word
  ]
]

to print each word and its value. In our example this will result in:
>> foreach word next first object [
[      print [
[           mold word
[           mold get in object word
[          ]
[    ]
word-1 "this is word-1"
word-2 "this is word-2"




;- Elan >> [: - )]

Reply via email to