Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-2205

Android regression: typeof returns "object" instead of "function" for native functions

    Details

      Description

      {html}<div><p>Functions on native proxies and modules are being reported as
      'object' by the typeof operator on Android in current 1.5 code from
      git; they should probably return 'function' to keep from confusing
      code.</p>
      <p>This source:<br></p>
      <pre>
      <code>Ti.API.info('typeof Ti.API.info is: ' + typeof Ti.API.info);</code>
      </pre>
      <p>On iOS gives the expected "function":</p>
      <pre>
      <code>[INFO] typeof Ti.API.info is: function</code>
      </pre>
      <p>On Android with git trunk we get unexpected "object":</p>
      <pre>
      <code>[INFO] [4,427] typeof Ti.API.info is: object</code>
      </pre>
      <p>Whereas under 1.4.1.1 we got "function" as we expected:</p>
      <pre>
      <code>[INFO] [2,364] typeof Ti.API.info is: function</code>
      </pre></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              mculpepper Marshall Culpepper
              Reporter:
              brionvibber Brion Vibber
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-1945
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration