[Rock-dev] API change in typelib (read on!)
Sylvain Joyeux
sylvain.joyeux at dfki.de
Thu Mar 24 10:50:01 CET 2011
The context
-----------
In the ruby API of typelib, when you get a type object type_t that
describes a compound (struct, class), one can get the type of the fields
by calling type_t.field_name.
Example:
struct Bla
{
int a_field;
};
in ruby:
bla_t = registry.get('Bla')
a_field_t = bla_t.a_field
at the end, a_field_t is an object describing the 'int' type
This is the source of all the "WARN: cannot define the method ...." you
are seeing these days.
The change
----------
Since there are so many clashes with normal ruby methods, I'll remove
that feature -- it is anyway mostly unusable. The removal is scheduled
at the end of next week.
If you *are* using it (something I would be surprised about), replace
bla_t.a_field
by
bla_t['a_field']
Sylvain
More information about the Rock-dev
mailing list