![]() |
Studio and enums
Hi,
I am not sure if I am just being dense, but I am having an issue utilizing enums in a project I am working on in studio. Here is the scenario Method I am calling which returns an enum Code:
Code:
Code:
Sage says it does not know what "jvl_vera_devices_Thermostat_HVAVMode_OFF" is. Is this possible. Am I doing something wrong. What do you do if there is an underscore in the name of the enum like "HEAT_OFF"? Any help would be appreciated. Josh |
I don't think I've seen an enum used in studio - it my simply not be supported. You likely should implement a simpler method that either returns a string, or a series of boolean 'isOff, isOn' etc methods.
|
Quote:
Do you know if there is a way to handle method names or variables with an underscore in them? |
Quote:
|
Quote:
http://www.oracle.com/technetwork/ja...ns-135099.html Quote:
|
Right, just remember that Studio is not Java. It utilized Java for it's expressions, but it is not equivalent to java code completely. It you want to run full java code, you compile that into a .jar, and make calls to that from the STV.
|
I figured out my issue. Apparently studio somehow handles variables and methods with underscores without issues. It also can handle enums without issues.
Where my issue was I created my enum as a subclass/innerclass of another class. Sage was having issues creating an instance of the enum or referencing methods of the enum in this manner. I moved it out to its own and it works great! So in otherwords I am not sure Studio can handle inner classes, or enums inside a class. This might have been my own stupidity, or possible just a weird reflection issue. Josh |
All times are GMT -6. The time now is 11:00 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.