Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Return null or undefined from a module

$
0
0

How do you return 'null' from an iOS module or 'undefined' from an Android module?

What I've discovered so far: Returning 'nil', 'Nil', 'NSNull', or 'NULL' from an iOS Module results in 'undefined' being returned to the JS controller. Returning 'null' from an Android Module results in 'null' being returned to the JS controller.

This is in an effort to make a module with parity for iOS and Android. Although its true 'undefined == null' It'd be nice if the return result was the same for both so it doesn't matter if I use '==' or '==='.

3.2.0.GA


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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