【问题标题】:How to log object properties in SenseTalk如何在 SenseTalk 中记录对象属性
【发布时间】:2021-02-09 06:23:48
【问题描述】:

在 SenseTalk 中记录对象的所有属性最简单的方法是什么?

喜欢这个C# example,但用于茄子脚本?

【问题讨论】:

    标签: eggplant


    【解决方案1】:

    有意义的谈话objects are represented as propertyLists。您可以使用精确的 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多