Re: Compatibility between version 1.4.x and 2.x.

Scott Raney (raney@metacard.com)
Wed, 12 Feb 1997 11:11:06 -0700 (MST)

On Tue, 11 Feb 1997, Kenji OTA wrote:

(snip)

> When I open my stack, the following message is shown many times in
> MetaCard's stdout.
>
> MCScriptPoint: ERROR tried to backup thrice
>
> And, when I click the button in which script "show" and "hide" commands
> to some fields are executed, "Execution Error" window is poped-up and
> it said "Show: Can't find object", etc.

This was a bug in 2.0 that was fixed in 2.1. The problem was
statements of the form:
hide background button "x"

The card/background distinction is pretty much obsolete in MetaCard
(it only makes a difference if you refer to objects by number, which
you should avoid doing whenever possible). So the error itself is
harmless.

> But, the object must exists because I can see the contents of the
> field by using "answer" command.
>
> Now, I guess this problem is because that my stack was at first
> developed on Macintosh HyperCard and ported.
>
> If you have any suggestions, please tell me.

The first recommendation is to upgrade to 2.1. It's free for 2.0
licensees, and has many new features and bug fixes.

Secondly, you should name your objects and use those names in scripts
that refer to the objects. Using id's will work too, but is a lot
more trouble for no real benefit.

Using the object number is a bad idea because it's too common for the
number to change when you rearrange the stack layout, and for problems
due to this card/background reference system to crop up. About the
only time when referring to objects by number makes sense is when
doing one-off kinds of things (like getting or changing the property
of an object from the Message Box), since it saves a little typing.
Regards,
Scott

> Thanks.
>
> -------------------------------------------
> Kenji OTA (ota@nttmcl.com)
> NTT Multimedia Communictions Laboratoies
> Phone:+1-415-833-3609 FAX:+1-415-326-1878
>

***************************************************************
Scott Raney raney@metacard.com http://www.metacard.com
Tcl and ksh: syntactic gymnastics
MetaCard: it does what you think