error in my /View script while playing with ports
[1/1] from: carloslorenz::rebolbrasil::nobrenet::com at: 16-Sep-2004 14:52
Hello list,
I am playing with this simple script that creates a messenger between
two stations (192.168.01 and 192.168.0.5) to better study the use of ports in
REBOL.
First I start the server at both stations
Then I send a message from station 192.168.0.1 to station 192.168.0.5 and the
message is read by station 192.168.0.5 ok.
Then when I reply the message to 192.168.0.1 a have a strange error in /View
that I cannot understand so I'd appreciate any help.
Follows both script and error message.
Thanks
Carlos Lorenz
#!/rebol/rebol -s
REBOL[
Title: {simple messenger}
]
start_listen: func[][
server: open tcp://:8000
forever[
port: first wait server
msg: copy port
msgbox/text: rejoin [msgbox/text newline msg]
show msgbox
]
]
send_msg: func[mymsg][
; at client 192.168.0.1 line after comment
; changes to "client: open tcp://192.168.0.5:8000
;
client: open tcp://192.168.0.1:8000
insert client mymsg
close client
]
screen_server: layout[
title "Listening on Port 8000"
across
msgbox: area 300x100 wrap
button "start server" [start_listen]
below
across
text "message" msg: field 300 button "send" [send_msg a: msg/text]
]
view screen_server
** Script Error: Invalid path value: text
** Where: func [face value][send_msg a: msg/text]
** Near: send_msg a: msg/text