Message-ID: <3B8BDAD6.9274DF94@attglobal.net>
Date: Tue, 28 Aug 2001 10:54:30 -0700
From: Chip Hayes <jwhayes@attglobal.net>
X-Mailer: Mozilla 4.72 (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: [Inform] add_to_scope meets the Vile Zero Error
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 32.100.7.224
X-Trace: 28 Aug 2001 17:51:21 GMT, 32.100.7.224
Organization: Global Network Services - Remote Access Mail & News Services
Lines: 28
X-Complaints-To: abuse@prserv.net
Path: news.duke.edu!newsgate.duke.edu!news-hog.berkeley.edu!ucberkeley!fu-berlin.de!bignews.mediaways.net!abq.news.ans.net!newsfeed.us.prserv.net!prserv.net!news3.prserv.net!32.100.7.224
Xref: news.duke.edu rec.arts.int-fiction:91715

Answering an earlier query which utilized add_to_scope as a solution
made me remember a small problem I've had in a project I'm working on myself...

When constructing an object such as the sterilising machine in the DM
(see exercise 103), where various components of such a machine (its
switches, dials, etc.) are "attached" to the main object using
add_to_scope, one can run into vile zero errors when attempting to take
one of those attached objects.

In that exercise, as in my code, the bits and pieces which are added to
the main object via add_to_scope are declared as being at the top of the
object tree, i.e. sans parent.

However, the fact that they have no parent object leads to at least one
Vile Zero Error.  In VerbLibm.h, AttemptToTakeObject() has the following lines:

  i=parent(item);
  if (i ~= ancestor && (i has container || i has supporter))
      {...}

Attempting to take, say, a switch or a dial from the machine (which are
declared static) leads to two vile zero errors (the two attribute tests
above), then the output of the standard "That's fixed in place." msg.

My question is:  Is this a library bug or is my programming faulty by
not having SOME kind of dummy parent object for these bits and pieces?

Chip
