Page 1 of 1

Confusing use of parentheses

PostPosted: Fri Jun 21, 2013 1:35 am
by Chasm
Hi to all, I'm a new user of Cobra. Like many of you I was unhappy with some aspects of other languages and now I believe I have found THE language that will ultimately surpass all others.

As much as I love it, though, there is one thing that really got me confused for a while. Since you don't have to use parentheses if you're calling a parameterless method, I obviously assumed that you don't have to do so when using a parameterless constructor.

So when I wrote the code bellow, it didn't work, because I actually assigned myTypeInstance the Type of MyType.

myTypeInstance = MyType
myTypeInstance.doSomething

I really see no way around this, so maybe a warning for newbies that may commit the same error?

Thanks a lot for the amazing language!

Re: Confusing use of parentheses

PostPosted: Fri Jun 21, 2013 9:23 am
by Charles
Thanks for the feedback. We'll look into detecting this situation and issuing a better error message.

Confusing use of parentheses

PostPosted: Sun Jul 07, 2013 8:13 pm
by FareHirehaf
Hi there,
I have read that I can use the GPIO-out with my IP cam to - for example - switch on a lamp or something like this.

HOW can I do this? Where can I find descriptions?

I have an Allnet All2282 IP cam.

thanks, max