On 1/26/00 7:58 AM, Daniel C. Kueng <[EMAIL PROTECTED]> wrote:
>A giant project which has been constructed in SuperCard is waiting to be
>ported to the PC platform. We can rule out rewriting; it needs to be
>converted, tested, and minor bugs/incompatibilities be fixed.
>
>If venturing this conversion project, we'll definitely need help from
>someone experienced in that area.
I am almost done with a similar (smaller) project. My SuperCard project
has about 4,000 lines of SuperTalk code, three windows, 800 cards, and
doesn't do as many varied things as yours does. I used the converter
available from xWorlds (www.xworlds.com) to pull apart my SuperCard
project, and then started working on it to make it function in MetaCard.
So far, here are my observations:
The converter doesn't like navigation events (openCard, etc.). I ended up
having to replace those handlers in SuperCard with on wOpenCard handlers,
and then reconverting on the MetaCard side.
MetaCard's editing environment is much more like HyperCard's than
SuperCard's. Many people like this, but it was very jarring for me. One
person said something like, "I prefer to operate on a patient that isn't
squirming around on the operating table." I agree. You'll have to get
used to the "always on" nature of the environment.
While we're on the subject of editing environments, MetaCard's is much
faster than SuperCard's. This is great. It's also a lot less appealing,
which a lot of people have commented on. Having now used it for several
months, this isn't as big a deal as it seemed at first. You get used to
it, and there are a lot of great aspects to it.
A small thing, but: SuperCard wants its transition effects quoted: visual
effect "wipe left" while MetaCard wants them unquoted: visual effect iris
open. This caused me no small grief early on. :-)
Despite the fact that MC and SC are both based on HC, they aren't as
similar as they first appear to be. This isn't so much because of
incompatibilities (although there are some, like the visual effect
syntax) as because of MetaCard's greater capabilities. Over and over
again I found myself recoding something that almost worked rather than
just tweaking it to fix it, because there was an obviously better way to
do it.
Along the lines of "there's a better way to do it," the way backgrounds
are handled in MetaCard is likely to completely change the way you design
your project. MetaCard can have multiple backgrounds on a single card.
Just by defining your backgrounds correctly, this allows you to do with
one command what you might have spent dozens of lines of code on before.
(My opening sequence involved making several graphics appear one after
the other. I did this by timing it, and making them visible with
transitions. In MetaCard, I broke it up into a sequence of cards, adding
in a new background for each one, and cut about fifty lines of code out
of my project.)
Menus are harder in MetaCard. Of course, handling menus on Mac and PC is
inherently harder; but SuperCard is simpler even given that. If you
enable and disable menu items, plan on working on that code; it doesn't
translate.
Expect quirks. Not that SuperCard doesn't have any, but after producing a
project the size of yours, you're used to them all. MetaCard has a whole
new set. :-)
Finally, I think it would have been easier for me to recreate my project
from scratch rather than use the conversion tool. This is no slight to
the xWorlds guys. Their conversion was faithful, it's just that moving
everything to MetaCard is not the largest component of the conversion
process. You end up rewriting a lot of your code anyway. My project
wasn't that complex to start with, and I did several things (like pasting
images in rather than referencing them) that I had to spend more time
correcting than it would have taken to do them the "MetaCard" way in the
first place. So, doing it over, I would have opened my project in
SuperCard, opened a new project in MetaCard, and started copying and
pasting. Given the size of your project, maybe that's not practical, but
especially with a big project, I think it's crucial that you follow a
three-step process:
1. Document your project completely as it is. You should detail at two
levels: _what_ happens, and _how_ it is done. Go into enough detail to
show the basics of how it was done in SuperCard. An example from my
splash screen would be something like,
The first card is the splash screen. It has several visible elements in a
background, that are shared with the next few screens. Some elements of
the background are invisible. The on OpenCard handler starts by playing
the theme song. The idle loop waits for the song to finish, then locks
the screen, makes the caterpillar visible, and unlocks the screen with a
blend transition. It then locks the screen again, makes the speech
balloon visible, and unlocks the screen, again with a blend transition.
It then plays the intro speech. The idle loop waits for the speech to
finish, then goes to the next card with wipe left/push left combo effect.
2. Examine the documentation with someone with MetaCard experience, to
rewrite the _how_ portion of the documentation in the way it will be done
in MetaCard. In this step, you should be looking for things like the
example above, which changed dramatically in the conversion: the one card
became several cards with several shared backgrounds; the idle loop code
went away in favor of on playStopped handlers; the formats of the
graphics had to be changed (I used PICTs in SuperCard); and I changed the
graphics to be referenced instead of embedded.
3. This depends on your preference. You either throw the project at the
conversion tool, then work through the result, changing things to match
the methods you documented in step 2, and touching up anything you missed
in step 2 that MetaCard points out, or you start building your project in
MetaCard, with the old version open in SuperCard to copy out of.
I hope this helps; good luck.
gc
Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm