Reputation: 540
What's the easiest way to log all the properties of an object in SenseTalk?
Like this C# example but for eggplant scripting?
Upvotes: 0
Views: 449
Reputation: 1083
In sense talk objects are represented as propertyLists. You can iterate over the keys of an object using the exact same syntax as you would with a propertyList.
set mike to {current:["Mike and the Mechanics","Genesis"],previous:"Red 7"}
repeat with each item of keys(mike)
put it & ": " & property (it) of mike
end repeat
// current: [Mike and the Mechanics,Genesis]
// previous: Red 7
Upvotes: 2