# RemoteObject sample

    source ../../oo.tcl

    @import core.*

    #- creating remote object from localhost
    if [catch {
      o = [RemoteObject newWithHost: localhost andCommand: "Object new"]
    } err] {
      puts stderr $err
      exit
    }
    puts stderr "$o is a RemoteObject instance from localhost"

    #- all local messages are forwarded to remote object
    puts stderr "remote id: [$o self]"
    puts stderr "remote class: [$o class]"

    #- sending local release message that will release remote object
    $o release