Sending messages between Revolution executables

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
theroadrunner
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2
Joined: Thu Nov 27, 2008 9:10 am

Sending messages between Revolution executables

Post by theroadrunner » Thu Nov 27, 2008 9:34 am

I'm trying to communicate beetween two Revolution compiled executables with the "send message to application x" command; it is very handy since it avoids opening and using sockets.
The mechanism works perfectly on a single computer, but when I try to do the same beetween two machines on the same network it doesn't work anymore, although the Revolution docs states in the samples

send "get field 3" to program "Corporate Zone:Other Mac:Revolution"

meaning you can send a message to another app running on an AppleTalk network. AppleTalk is turned on in the system>network control panel on both machines

Did anybody experiment with this issue ? Thanks in advance !

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Thu Nov 27, 2008 12:37 pm

While I haven't done anything with it recently, I did use this approach back in 2003. Here are a few things that I remember:
1) Both applications hgave to run on MacOSX, no Windows or Linux machines.
2) The 'receiving' app MUST 'pass' any AppleEvent that it won't reply to, or both applications will 'hang'.
3) In case you can't get it to work, look at this tip on the Sons of Thunder site, where I explained a workaround.

If you're looking for a cross-platform solution, you'll still have to move over to TCP/IP socket communication, which is pretty easy in Revolution, actually.
In the Revolution IDE, click on the toolbar icon for RevOnline > User Spaces > Browse by Name > alextweedly and there you'll find examples for both TCP and UDP client-server communication.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Post by mwieder » Thu Nov 27, 2008 8:33 pm

I second the move to using sockets. You'll get cross-platform portability, avoid the headaches of using the "send" command, and it's not that hard to do once you've got the basics down. Yes, check out Alex Tweedly's examples on revOnline.

Post Reply

Return to “Mac OS”