Getting started

323 views
Skip to first unread message

martin....@vcs.de

unread,
Nov 11, 2015, 8:38:26 AM11/11/15
to ember-plus-development
After longer interruption due to other work I am continuing to explore Ember+/Glow/S101 in depth.

I have built all projects of  the Ember+ SDK 1.6.2 solution using Microsoft Visual Studio successfully and now I want to continue by playing around with the Test Projects included in the visual studio solution.

The first tests with "GlowValue" were quite disappointing  - the first test exception is firing, and since the exceptions descriptive text starts with "Unexpected..." my guess is, that the firing is bad in this case ...


....
             libember::glow::GlowParameter p(1);
  
           p.setValue("HelloWorld");
            libember::glow::Value const value = p.value();
            if (value.type().value() != libember::glow::ParameterType::String)

....

it seems that (value.type().value()returns 4, and libember::glow::ParameterType::String==3

My guess is, that "4" is given by "libember::ber::Type::OctetString" from "Type.hpp"

Is this ...

1) an error, that was built in GlowValue.cpp as a kind of educational session to be corrected by the one trying to get familiar with the code?

2) some kind of misconfiguration of the project (Preprocessor defines missing, etc, wrong character format wchar/char ...)?

3) ....?


 

martin....@vcs.de

unread,
Nov 11, 2015, 11:36:40 AM11/11/15
to ember-plus-development

Fixed it by myself

....
             libember::glow::GlowParameter p(1);
  
           p.setValue("HelloWorld");
            libember::glow::Value const value = p.value();
            if (value.type().value() != libember::glow::ParameterType::String)

....

it seems that (value.type().value()returns 4, and libember::glow::ParameterType::String==3


The retuned 4 is not "libember::ber::Type::OctetString" but "libember::Glow::ParameterType::Boolean"

This is caused by the fact, that there is no method  GlowParameterBase::setValue(const char*)

Using

             p.setValue(std::string("HelloWorld"));

instead of using

             p.setValue("HelloWorld");

Heals the problem

 

Hoffmann, Kimon (Lawo AG)

unread,
Nov 16, 2015, 2:55:00 AM11/16/15
to ember-plus-development
Hi Martin,

> This is caused by the fact, that there is no method GlowParameterBase::setValue(const char*)
>
> Using
>
> p.setValue(std::string("HelloWorld"));
>
> instead of using
>
> p.setValue("HelloWorld");
>
> Heals the problem


Sorry, for being so late to react to your original question. You are correct the overload resolution is the cause of the problem you observed and there already exists an open issue regarding this particular pitfall: https://github.com/Lawo/ember-plus/issues/6

Glad to see you were able to solve it by yourself!

Best regards,
Kimon

Reply all
Reply to author
Forward
0 new messages