csantanapr / dapp-examples

Series of Single Page Apps using the dApp Framework
http://csantanapr.github.io/dapp-examples
Other
5 stars 4 forks source link

not allowed to run this.inherited(arguments); when use strict on RequestListItem itemRenderer #8

Open csantanapr opened 11 years ago

csantanapr commented 11 years ago

not allowed to run this.inherited(arguments); when use strict on RequestListItem itemRenderer

https://github.com/csantanapr/dapp-examples/blob/master/dapp-request/src/app/views/list/list.js#L31

error when postMixInProperties its run and tries to run this.inherited(arguments);

postMixInProperties: function () { //TODO: Talk to dojo expert about this. calling this cause an error //"TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them //at inherited [as __inherited] (http://localhost:8080/dojo/_base/declare.js:98:16) //this.inherited(arguments); this.id = "request_" + this.id; //FIXME: really ugly hack to get unique dom node id, this might be a bug on dojo EdgeToEdgeStoreList to generating a dynamic id this.transitionOptions = { params: { "id" : this.id } };

edchat commented 11 years ago

Hi Carlos, The current plan for dojo 2 ( which you can see is accepted here: http://dote.kitsonkelly.com/topic/42744a0f-4def-41cc-af76-3ed49291b06a ) is shown here: https://github.com/csnover/dojo2-core#linting And it says this: "noarg: In order to discourage the incorrect use of arguments in codebases that follow the Dojo code conventions, this option is false by default. However, there are situations where the use of arguments.callee is necessary. In these cases, this option may be set to false using /jshint/" So it sounds like you should use jshint to override this option if you need to use this.inherited(arguments);