So I've written my first script to control my new Homeseer switches. On a single tap it dims lights based on the time. Another tap will take you to a peak brightness for that time period. Taps after that toggle between the two. It's roughly based on rprade's event logic in https://board.homeseer.com/showthread.php?t=182447
But wow did this take me a lot longer than it should have. I write code everyday for iOS/Android so I kinda know what I'm doing. But there's a lot to be desired in this runtime. Hoping someone can point out what I'm missing.
But first off, I'm surprised of the version of VB.NET. If you query
you'll get
which translates to a PREVIEW version of 4.5. I have no idea who made the call to ship a PREVIEW version of a language, but damn that's a bold move.
Next: compile errors. Holy crap is VB.NET an interesting language to script in. It could be worse, but the problem lies with the lack of any kind of useful description when you type something wrong. God only knows how many times I added a "{" after a function declaration and had to back out all my changes until I could pinpoint the line.
Adding a line number to compilation errors would be a 1000% improvement.
And the API is a bit quirky. Not sure if anyone has noticed the mis-spelling in CAPIControslHandler. That's really what it's called. But anyways, I can deal with an odd API, I guess my complaint really lies in the compiler and the shipping version of .NET
So, does anyone know how to get useful compilation errors? I'm on a SEL with HS3 Standard Edition 3.0.0.297
But wow did this take me a lot longer than it should have. I write code everyday for iOS/Android so I kinda know what I'm doing. But there's a lot to be desired in this runtime. Hoping someone can point out what I'm missing.
But first off, I'm surprised of the version of VB.NET. If you query
Code:
Environment.Version.ToString()
Code:
4.0.30319.17020
Next: compile errors. Holy crap is VB.NET an interesting language to script in. It could be worse, but the problem lies with the lack of any kind of useful description when you type something wrong. God only knows how many times I added a "{" after a function declaration and had to back out all my changes until I could pinpoint the line.
Adding a line number to compilation errors would be a 1000% improvement.
And the API is a bit quirky. Not sure if anyone has noticed the mis-spelling in CAPIControslHandler. That's really what it's called. But anyways, I can deal with an odd API, I guess my complaint really lies in the compiler and the shipping version of .NET
So, does anyone know how to get useful compilation errors? I'm on a SEL with HS3 Standard Edition 3.0.0.297
Comment