temp_closure when I use readable(owner)

About advanced scenes, and the Thyme scripting language used in Algodoo.

temp_closure when I use readable(owner)

Postby icrls984 » Wed May 13, 2020 12:17 am

In a box I set
Code: Select all
text = {
    s := readable(owner);
    "" + s
}

Sometimes it displays temp_closure, instead of showing the object properties (ClassObject with children: ...) in the text. Why does this happen? How to reliably use readable(owner)?

Thanks!
.
User avatar
icrls984
 
Posts: 80
Joined: Thu Jun 13, 2013 6:33 am

Re: temp_closure when I use readable(owner)

Postby Xray » Tue May 19, 2020 6:28 am

Hi icrls984,

You are using it correctly in the sample script that you show here, and I tested it just to make certain. Each time I run that script in a test scene, it does display "ClassObject with children" along with the entire list of items and their values. If you occasionally get an error message, I wonder if there might be some other script in your scene which interferes with it some how. Try running the script by itself in a box by itself and see if it constantly produces the correct text output. If it does, then I would check other code in the object (of the scene) in which it resides to see if something might be causing problems with it.

Xray
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests