Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: /View script help (playing with ports)
Pages: [1] Print
Author Topic: /View script help (playing with ports)  (Read 467 times)
carloslorenz
Newbie
*
Offline Offline

Posts: 9


View Profile
/View script help (playing with ports)
« on: September 17, 2004, 11:19:25 AM »

Hi

I have posted this on REBOL list yesterday and decided to post it here also.

I made this simple messenger script that works ok when I first send a message from no matter wich machine (A ou B) but
then I just cannot answer the message because /View gives me an error a cannot understand why.

Here are the script and the error:

----------------------- The script -------------------------------------

#!/home/knoppix/rebol/rebol -s
REBOL[
Title: {Smiple 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][

        ; this following line changes in the other machine 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 "menssage" msg: field 300 button "send" [send_msg a: msg/text]                                             
]

view screen_server


----------------------- The error -------------------------------------

** Script Error: Invalid path value: text
** Where: func [face value][send_msg msg/text]
** Near: send_msg msg/text
>>
 
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: /View script help (playing with ports)
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 07:04:07 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2191 Posts in 572 Topics by 1684 Members
Latest Member: CinemeandaBek

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc