Prence: you can not define something in WED, nor does -sv and -cl #define something in lite-C. Please see: http://manual.conitec.net/define.htm. Use the connection variable to find out in which mode your app was started.

Richey: yes, that code should work. Maybe there's a bug. I'll look into it in detail, and let you know.