Need help opening a Macintosh Hypercard addess stack on a Windows PC with revolution

J. Landman Gay jacque at hyperactivesw.com
Mon Nov 28 15:43:14 EST 2005


kee nethery wrote:
> Wonder if it would make sense for the runrev team to translate that  
> specific HC stack (assuming they are using the one that was provided  by 
> Apple) and to build a hypercard based exporter/importer (in case  they 
> added some fields or buttons to the Apple stack). She could run  the 
> exporter and have it dump the data to a text file, and then the  runrev 
> equivalent could import that text file and add additional  buttons or 
> fields as needed. Just a thought.

Good thought, but probably not workable, unfortunately. The problem 
isn't really the objects or the data, both of which convert very well 
automatically. The native importer that already exists does a fantastic 
job, it is really quite impressive.

What generally needs tweaking is almost always script-related. The most 
common things that need human attention include:

1. Menus. HyperCard menus are scripted. Rev menus are objects. Menu 
handlers must be rewritten manually and a menubar has to be created and 
assigned. I suppose some kind of conversion could be done automatically 
but it would be very difficult, as scripters tend to write their HC menu 
scripts in all sorts of different ways (and HC allows several alternate 
kinds of syntax.)

2. Calls to XCMDs/XFCNs. These don't generally convert over, so 
externals are omitted from the import. In most cases HC externals can be 
scripted using native Rev commands and no externals are needed at all. 
Because there are thousands of HC externals in use, automatic scripts 
are impossible. Calls to externals always throw errors. The most common 
trouble-making external is AddColor. All addColor calls have to be 
replaced by Rev color scripting, and/or all stack objects have to be 
recolored using native Rev color properties.

3. Unquoted literals. HC allows them, Rev usually doesn't. The only 
solution is to go through the scripts, find the literals, and add quote 
marks around them. Again, not easily done via an auto-converter because 
it is impossible to tell which words are intended as literals and which 
are intended to be variable names. (Unquoted literals are very poor 
programming technique, but unfortunately they are common in HC stacks. 
HC was pretty lax about it.)

4. Rev keywords used as variable names. Again, probably impossible to 
automate. Rev has three or four times as many keywords as HC, and in 
addition, HC allows its own keywords to be used as variable names. It is 
common to see syntax like:

   put the name of this cd into name
   put the short date into date

This causes Rev to complain, but HC allows it. Only a human can figure 
out which words in a script should be variables and which are language 
keywords. Those that should be variables need to be changed in every 
instance throughout the stack.

There are a few other things the seize up too, but in general I think 
all the automatic stuff has already been addressed very well and what is 
left needs to be looked at by a human.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list