Attributes and dictionaries

Feb 28, 2010 at 12:30am

Attributes and dictionaries

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

#48815
Mar 1, 2010 at 12:19pm

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()?

Cheers

#175433
Mar 1, 2010 at 7:02pm

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

Thanks Tim.

- Luigi

#175434

You must be logged in to reply to this topic.