THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/04/2009 at 06:00, xxxxxxxx wrote:
For dynamic descriptions, the value should be stored someplace else besides the description itself. If in a BaseContainer or class variable, set the default value in the Init() of your plugin data class using something like:
//*---------------------------------------------------------------------------*
Bool MyPluginData::Init(GeListNode* node)
//*---------------------------------------------------------------------------*
{
desc = Description::Alloc();
if (!desc) return ErrorException::OOMThrow(EE_DIALOG, GeLoadString(IPPERR_MEMORY_TEXT), "IPPBase.Init.desc");
// Class member variable
value = 0L;
// OR
// Initialize container value
BaseContainer* bc = ((BaseObject* )node)->GetDataInstance();
bc->SetLong(MYPLUGINDATA_VALUE, 0L);
return TRUE;
}
Most likely, as you are using a dynamic description, the BaseContainer option will not be possible unless you have, say, a block of ids setup to accomodate the dynamic descriptions wherein you'll need to initialize them all. In some cases, the value may be stored in another class or plugin basecontainer and you should initialize there (in the constructor or Init()).