Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (logging)
Viewing all articles
Browse latest Browse all 20

Logging objects

$
0
0

I've been playing with Titanium for a bit now and so far one of my major gripes is the limited logging using the built-in Titanium.API.log() function. Being spoiled with PHP's var_dump function I was trying to simulate this functionality, but I got stuck on a rather silly part: I can't seem to iterate over a Titanium-generated object's properties.

var btn = Titanium.UI.createButton();
for(var i in btn){
    Titanium.API.log('key: ' + i + ', value: ' + btn[i]);
}
This is a rather simple example that I can't seem to get working :( is this behaviour somehow 'unavailable' for TI objects?

Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>