Next: , Previous: Mobile Methods, Up: Core Methods



5.1.10 Location Methods

— Method on Location: init contents

Adds contents information to Described's list.

— Method on Location: addToContents objectRef

Adds the given object to the current contents list.

— Method on Location: getContents contents

Standard variable get.

— Method on Location: getContentsString string

Returns a string that contains a list of the names of all the objects in the object's contents list.

— Method on Location: removeFromContents objectRef

Removes the given object from the current contents list.

— Method on Location: wantToGet newLocation origRecord newRecord

This is called by other objects who desire to get one of the objects from our contents list. See get on Location. origRecord is a minimal object reference to the object that newLocation wants.

— Method on Location: wantToGive oldLocation objectRef result

This is called by other objects who desire to give us one of the objects from their contents list. See give on Location. result is set to true if we accept the object, false otherwise.

— Method on Location: searchByObjectName name except objectRef result language

Returns the object in our contents best matching the given name, else returns a standard result in result. except is used to exclude the calling object from the searching, as this will cause a hang.

— Method on Location: announce string except

This is called by other objects who desire to have a string presented to the tell methods of all objects in this location (at least, those _with_ tell methods).

The except argument takes an object reference and causes the string to not be presented to that object. This is very important, because if you call announce and the object making the announce call has a tell method, the announce will hand trying to re-enter that object. So, always put the object calling announce in the except argument!

— Method on Location: get fromLocation objectRef

Gets an object from another object, which must be a descendant of location.

First we call getFrom on the from location, then put the object that that call returns into our contents list.

Note that objectRef is limited reference to the object we want to get.

See wantToGet on Location.

— Method on Location: give toLocation objectRef

Gives an object to another object, which must be a descendant of location.

First we call wantToGive on the from location, then remove the object that we give to that call from our contents list if the call returns true. See wantToGive on Location.