close stack question

Richard Gaskin ambassador at fourthworld.com
Wed Jan 21 22:53:42 EST 2004


Doug Lerner wrote:

> In the docs it says "The clone command places the name property of the newly
> created object in the it variable."
> 
> But if I 
> 
> clone stack "wb"
> 
> and then log the value of "it", it is
> 
> stack "Copy of wb"
> 
> Why isn't it just
> 
> "Copy of wb"

Getting the name of object includes a complete reference, while the short
name includes only the name property.

I'm not sure why the original HyperTalk language established this
convention, but in this case it allows you to write generalized handlers for
objects without needing to know the object's type:

  create field
  set the width of it to 200

...as opposed to:

  create field
  set the width of field it to 200

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list