Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How can I know the properties of an object In Titanium?

Can any one tell me how to use an object of Titanium such like a UIControl without the documentation(seems the documentation is not the latest)
for example,there is a new API named "Titanium.UI.createMaskedImage()".how can I know what properties to declare it,is the properties named "X/Y"?or "width/height"?

Is there any way to traversal the properties of an object of Titanium?I tried the following way,but it seems doesn't work

for(var p in obj){  
  Titanium.API.debug(p); //obj is a Label,but nothing shows here
}

and I can't find the definitioin of those controls of Titanium in the Source Code,may be it helpful if I know where the JavaScript definition is,can anyone tell me?
many thanks.

— asked November 4th 2010 by Wen Bin
  • properties
0 Comments

1 Answer

  • It can be a bit of a black box at times! Check out the code samples in the Kitchen Sink example. You'll sometimes find properties & methods used there that aren't in the docs. Keep in mind that at this point, there isn't parity between the platforms. So, what works on Android might not work on iPhone and vice versa.

    Tim

    — answered November 4th 2010 by Tim Poulsen
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.