Articles Archive
Director Forums
Director Wiki
Job Board
Search
 
 Director Online WikiMain Page | About | Help | FAQ | Special pages | Log in | Printable version | Disclaimers

ObjectP

From Director Online Wiki

objectP is one of the predicate functions in Lingo. objectP returns either true or false depending on whether the variable in question is a complex variable type such as an object created from a parent script, and Xtra or a Window. In addition objectP will return true if pass a list or property list.

Example

testScript = new (script"foo")
put objectP(testScript)
-- 1

testList = [1,2,3,4,5]
put objectP(testList)
-- 1

As such it is usually much safer to use the ilk function to determine the exact type of a variable.

What is an object?

All the following are considered to be objects:

  • scripts
  • instances of scripts
  • property and linear lists
  • points and rects
  • members
  • sprites
  • vectors
  • colors

These data types all have properties, and are passed by reference rather than by value.

See also:

ilk

Retrieved from "http://www.director-online.com/dougwiki/index.php/ObjectP"

This page has been accessed 1262 times. This page was last modified 21:16, 5 May 2005.