Question about the name of the target for new graphics

J. Landman Gay jacque at hyperactivesw.com
Tue Jan 20 00:09:56 EST 2004


On 1/19/04 11:06 PM, Doug Lerner wrote:

> 
> I am creating a graphic with the
> 
> new graphic newName
> 
> command.
> 
> in the newGraphic handler, if I log "the name of the target" it is the usual
> "Graphic 1", etc, which I don't expect.
> 
> However, in the stack inspector the created graphics name is correct.
> 
> Why doesn't "the name of the target" report correctly then inside the
> newGraphic handler?

When a new object is created, it has no properties yet. The newgraphic 
(or new-anything) message is sent before any properties are assigned. By 
the time the inspector sees the object, it is done being created and now 
has a name.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list