[REBOL] System... and the other objects! Re:

2000-02-23 Thread icimjs

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  [: - )]



[REBOL] System... and the other objects! Re:

2000-02-22 Thread strejcek

[Charset iso-8859-1 unsupported, filtering to ASCII...]
 Ok Jeff... I've done it. Thanks!
 
 I preferred to do the set-net and then configured the
 system/schemes/smtp/proxy things to none! It's better like this 'cause I
 just don't need the proxy to access my mail server.
 
 Now I have another question (sorry to bug you all, but the FAQ's just
 don't answer these ones):
 How can I know wich objects, variables and other things exist under an
 object?!
 It's like this: I know that under system I have schemes. (system/schemes).
 How can I know all the objects under a certain object?!

Try this:

 tmp: make object! [a: 1 b: 2]
 first tmp
== [self a b]

OR for concrete words in object:
 found? in tmp 'a
== true
 found? in tmp 'c
== false   

Regards,
Jan

--
Jan Strejcek
[EMAIL PROTECTED]