I’m still working on my plugin and again I’m facing to something I can’t understand. I’ve defined setter and getter for some properties. When I try to populate these properties Xojo calls the setters with an empty string. This is clearly an issue with what I do. To make sure I compiled and tested CompleteClass exemple and the setter for MooseName works.
REALproperty DocPDF_Properties[] = {
{"", "Author", "String", REALconsoleSafe, (REALproc)DocPDF_AuthorGetter, (REALproc)DocPDF_AuthorSetter},
{"", "CreationDate", "DocumentDate", REALconsoleSafe, nil, (REALproc)DocPDF_CreationDateSetter},
{"", "ModificationDate", "DocumentDate", REALconsoleSafe, nil, (REALproc)DocPDF_ModificationDateSetter}
};
What is strange is that if I change the type String to String111 for example or anything else Xojo IDE does not complain about an unknown type. The two setters with custom type DocumentDate work fine.
static void DocPDF_AuthorSetter(REALobject instance, REALstring info)
{
REALstringData infodata;
const char *author;
ClassData(DocPDF_Definition, instance, DocPDF_Data, me);
if (!(REALGetStringData(info, kREALTextEncodingUTF8, &infodata)))
return;
author = static_cast<const char *>(infodata.data);
REALDisposeStringData(&infodata);
........
........
}
Everytime DocPDF_AuthorSetter is called info is null. I rebuild the plugin from scratch and emptied the Xojo cache.
Any clue would be much much appreciated !!! Thanks in advance.