Program Linking

Richard Gaskin ambassador at
Wed Mar 13 15:51:01 EST 2002

Ben Rubinstein <benr_mc at> writes:

> on 13/3/02 1:23 AM, Richard Gaskin at ambassador at wrote:
>> Of course, if the communication is between a Rev-based app and something
>> else, you're limited to what that something else provides.
> I think you're missing the point.  This is useful exactly for communication
> betwen a Rev-based app and something else; it's part of the interface a
> decent Rev-based app that does something using or to other apps may need.
> *  You write something in Revolution to do something to a text file - count
> the words, for example.   You need an interface for the user to choose a
> file to operate on.
(clipped for brevity)
> You can: "answer file".
> * You write something in Revolution to do something using QT visual effects
(clipped for brevity)
> You can: "answer effect".
> * You write something in Revolution that does something to a third-party app
> over AppleScript.  You need an interface for the user to choose the app to
> target, which may be on another machine on the network.  You could have a
> field in which the user types the full path - that's ugly, work for the
> user, prone to error.  You could code a dialog stack yourself - but hang on,
> you can't - how can you establish what machines are on the network, and what
> AppleEvent-aware apps are running on each machine?  Since the operating
> system has a built in AppleScriptable-process browser, which is the standard
> used by most other apps, you should be able to invoke that.  You can't.
> That's why Rev/MC should support "answer program".

Agreed on all points.

But no matter how useful it is, Apple has not included the call needed to
access the "answer program" dialog in the CarbonLib API (at least as of
Universal Headers 3.4.1).   The other dialogs you mentioned are still
supported by the current OS and are present in Revolution (along with
"answer color", a personal favorite -- thanks Kevin and Scott!).

Rev deploys on nearly 100% of all modern desktop computers.  Both of Apple's
OSes have an aggregate marketshare reported by MediaMetrics to be about
2.5%, and the company themselves says the Classic OS is being phased out in
favor of a company-wide migration to OS X as soon as possible.  Even if we
account for the disproportionately high number of Mac folks developing in
Rev (a number that would make Apple proud), Apple tells us to think OS X if
we want to stay in the game.

However valuable "answer program" would be for those using Mac Classic, the
diminishing size of the affected audience suggests that it might be more
cost-effective to have access for that dialog provided by an external, at
least until Apple provides support for this in the current OS.

The Rev folks could add it directly, but given what we know of the situation
it seems likely that they'll need to replace it as Apple moves the CarbonLib
closer to completion.  If it's cost-effective for them to do it sooner of
course we would all enjoy having it.  But as with dialog sheets and
throbbing default buttons, until those things are included in the CarbonLib
API any interim solution would likely need to be rewritten in less than a
year, possibly just a few months.

Another alternative might be to find out how to script that from within
FaceSpan or other AppleScript-based tool, and use those AppleScript calls
from within Rev to present the dialog, or at least retrieve a list of
current processes.  Is there an AppleScript function for this?  How does
FaceSpan do it?

In the meantime, a polling of local IPs can retrieve info from other apps
(such as an identifying string) using sockets rather quickly.  With such
information you could build a dialog for any of your custom Rev-based apps,
on any platform, anywhere in the world.  You can do it with what you have
today, and it will work in tommorrow's OS.  This doesn't address
non-Rev-based apps (as quoted above), but if you're linking Rev-based apps
there are many benefits to this approach.

It would be more practical, as some have suggested here, to use UDP
broadcasting instead of walking through the subnet list.  But I've had
difficulty getting UDP broadcasting to work in Rev.  Anyone have an example
of how to do a UDP broadcast in Transcript?

 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 1.9: Publish any Database on Any Site
 Ambassador at
 Tel: 323-225-3717                       AIM: FourthWorldInc

More information about the use-livecode mailing list