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

commonJS error"Object function Controller()"

$
0
0

Hi, i'm trying to use a commonJS to resize my view's childrens. I've used this code:

resizeChildren.js

exports.resizeChildren = function () {
    Ti.API.info("resize done");
};
in the index.js, inside a function i call the function so:
require('/resizeChildren').resizeChildren();

The resizeChildren.js is in the controllers folder, and even the index.js. When i run the app, the console shows me this exception:

V8Exception: Exception occurred at alloy/controllers/index.js:1: Uncaught TypeError: Object function Controller()....
the ellipsis indicate that the error continue with the description of the next function.

Do you have any suggestion? What am i doing wrong?

Thanks in advance


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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