dpjanes / node-iotdb

Easily control the Internet of Things using Semantics
Apache License 2.0
47 stars 10 forks source link

Question for lines 308 - 317 #2

Open relaxedtomato opened 9 years ago

relaxedtomato commented 9 years ago

I am receiving the following error when trying to use models. Not sure what the issue is.

return this.attribute(_.deepCopy(attribute)).code(code).control();
                                                                   ^
TypeError: Object [object Object] has no method 'control'

 // reading
 ModelMaker.prototype.i = function (code, attribute) {
 console.log('hello');
 return this.attribute(_.deepCopy(attribute).code(code).reading());
} ; 

// control
ModelMaker.prototype.o = function (code, attribute) {
return this.attribute(_.deepCopy(attribute).code(code).control());
};
relaxedtomato commented 9 years ago

Or this issue, basically for the 'code' call.

return this.attribute(_.deepCopy(attribute).code(code).control());
                                                ^
TypeError: Cannot call method 'code' of undefined
dpjanes commented 9 years ago

Hi Richard,

How is this being called?

On Tue, Feb 17, 2015 at 6:25 PM, Richard notifications@github.com wrote:

Or this issue, basically for the 'code' call.

return this.attribute(_.deepCopy(attribute).code(code).control()); ^ TypeError: Cannot call method 'code' of undefined

— Reply to this email directly or view it on GitHub https://github.com/dpjanes/node-iotdb/issues/2#issuecomment-74777924.

relaxedtomato commented 9 years ago

I am calling it via 'node model.js' for homestar-lifx.

dpjanes commented 9 years ago

Can I get the complete stack trace?

D.

On Tue, Feb 17, 2015 at 8:29 PM, Richard notifications@github.com wrote:

I am calling it via 'node model.js' for homestar-lifx.

— Reply to this email directly or view it on GitHub https://github.com/dpjanes/node-iotdb/issues/2#issuecomment-74793837.

dpjanes commented 9 years ago

I think I've got the problem fixed.

D.

On Wed, Feb 18, 2015 at 3:14 AM, David Janes davidjanes@davidjanes.com wrote:

Can I get the complete stack trace?

D.

On Tue, Feb 17, 2015 at 8:29 PM, Richard notifications@github.com wrote:

I am calling it via 'node model.js' for homestar-lifx.

— Reply to this email directly or view it on GitHub https://github.com/dpjanes/node-iotdb/issues/2#issuecomment-74793837.

relaxedtomato commented 9 years ago

I haven't had a chance to take a look, will come back to this tomorrow.