Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "apiName" to help list proxy properties #65

Open
tonylukasavage opened this issue Oct 20, 2014 · 0 comments
Open

Use "apiName" to help list proxy properties #65

tonylukasavage opened this issue Oct 20, 2014 · 0 comments
Milestone

Comments

@tonylukasavage
Copy link
Owner

If you attempt to inspect a Titanium namespace or Titanium proxy, you get some pretty lackluster results due to the nature of Titanium proxies:

≫ triple
[launching app]
> typeof Titanium.XML
'object'
> Ti.XML.apiName
'Ti.XML'
> Ti.XML
undefined

So we know it's an object and that it has an apiName, but beyond that, normal inspection just doesn't work.

It would be awesome when returning the inspection value if we did the following:

  1. checked to see if it is a Titanium proxy (weak check for apiName will work for now)
  2. If it's not, then just return the value as usual
  3. If it is a proxy, use the apiName and the api.jsca file (which we're already loading for tab completion) to create a proxy of the proxy (yikes) which has all the appropriate properties and values attached to it, via manual assignments based on the api.jsca data.
  4. Now that we have a real JS object and not a Titanium proxy, we can pass it through the normal inspection return value function and we should get a full listing of all properties and values.
  5. Voila, full inspection of Titanium proxies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant