for attribute in dir(objectICareAbout):
print attribute
"OG_OTT" wrote:
Is there a way to introspect objects in Roku? For instance, if I `stop` in my brs file, and do a "? objectICareAbout" and it gives a bunch of fields/properties/attributes (what-have-you) but then shows "...",
...
Brightscript Debugger> ?m
<Component: roAssociativeArray> =[/size]
{
port: <Component: roMessagePort>[/size]
}
Brightscript Debugger> ?m.port.keys()[/size]
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(29)
Brightscript Debugger> a = {"a" : "1", "b" : "2" }
Brightscript Debugger> ?a
<Component: roAssociativeArray> =
{
a: "1"
b: "2"
}
Brightscript Debugger> ?a.keys()
<Component: roArray> =
[
"a"
"b"
]
**Where a and b are replaced with members for roMessagePort such as "WaitMessage" and "GetMessage" and "PeekMessage" and maybe any other members/attributes/properties/fields/methods/functions.
>>> dir(dict)
['__class__', '__cmp__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__',
'__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__',
'__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'pop', 'popitem', 'setdefault',
'update', 'values', 'viewitems', 'viewkeys', 'viewvalues']
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!