Hi Kerry

The 15 is the reference count of the particular object instance. In your
case, surmising that sprite group parent relates to a group of sprites and
each object/behaviour attached to a sprite that belongs to this group holds
a reference to that object instance. A quick test to prove the point would
be to create a real simple object and put the instance into a variable. Then
do a put statement with that variable and it should show something like

-- < offspring "Some Object Class" 1 23f233>

now assign that variable to another variable
ie. someVariable2 = someVariable1

put someVariable1

-- < offspring "Some Object Class" 2 23f233 >

continue the process, with each new assignment, the reference count should
increase by one.

as each variable is cleared or set to 0 or void or whatever else you choose,
the reference count will drop by 1.

The only method you can use to accurately track a particular instance is to
create a string of the object reference and single out the memory address
portion. You could do the whole thing, however, the only constant portion is
the:

< offspring "Some Object Class"

and the

23F233 >

portion.

if you use the string of the whole thing and compare the string of a given
instance then it would fail as soon as the reference count of that object is
altered in anyway.

The best alternative would be to perhaps create a string of the reference
and then parse out the memory address to track which instance your looking
at, using the first portion as the primary filter and the address as the
final filter, and use the reference count number as a factor to indicate
changes... alternatively and perhaps even better, would be simply to add
specific instances to the watch window and keep a running tab (or eye) on
what is happening to the reference count etc...

Not sure if this helps at all.

Sincerely
Mark R. Jonkman

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Kerry Thompson
Sent: Wednesday, September 12, 2001 7:09 PM
To: [EMAIL PROTECTED]
Subject: <lingo-l> Object References


When I see an object reference such as:

<offspring "Sprite Group Parent"15 3765f98>

what do the numbers signify? I surmise the 3765f98 is the RAM address of
the object. How about the 15? Does that mean it's the 15th object created?

I'm asking because I have a number of objects created from the same parent
script, and I'm worming my way through some pretty dense code, looking for
a way to keep track of which instance I'm in.

TIA


Cordially,

Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]




[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to