Forums > Dev

Attributes and dictionaries

Feb 28 2010 | 12:30 am

Hi there,

I have an attribute declared as a 2 element array of doubles:

CLASS_ATTR_DOUBLE_ARRAY(c, "myattr", ATTR_FLAGS_NONE, t_myobj, myattr, 2);

In my object_new() method I would like to retrieve from the dictionary the values of this attribute before calling attr_dictionary_process().

However, the ext_dictionary.h API does not have a function for retrieving arrays of doubles.
What function should I use to accomplish the above?

Thanks in advance for any help.

– Luigi

Mar 01 2010 | 12:19 pm

Hi Luigi,

I assume that you’ve defined defaults in your main() function, and now you are trying to retrieve those defaults? I’m not entirely sure what you are trying to do, but did you try using dictionary_getatoms()?


Mar 01 2010 | 7:02 pm

Yes, defaults are of course defined.
…and dictionary_getatoms() does the trick.

Thanks Tim.

– Luigi

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Dev