kchan2++at++csc.com
Thu, 9 Sep 1999 20:35:43 +1000
I assigned a data slot copy callback to a pfGroup. When the callback is
invoked, src->getUserData(slotNum) returns NULL. According to the man page, the
print, delete and copy callbacks are invoked when a pfobject has non null user
data in the slot. I am running IRIX 6.5 with performer 2.2.1
When src->getUserData returns NULL, I just exit the function without doing
anything to the data slot in dst. Any suggestions?
Here is the callback:
void copySlot( pfObject* dst, const pfObject* src )
{
// get the destination node and delete its user data
assert( dst );
void* dstUserData = dst->getUserData( slot );
if( dstUserData )
{
pfMemory::unrefDelete( dstUserData );
}
// get the source node's user data
assert( src );
void* srcUserData = src->getUserData( slot );
if(!srcUserData)
return;
// share the source node's user data with the destination node
pfMemory::ref( srcUserData );
dst->setUserData( slot, srcUserData );
}
Regards
Kenneth Chan
__________________________________________________
CSC Australia
460 Pacific Hwy St Leonarrds NSW 2065
Ph: +61 2 9901 1165 Mobile: 0413 04 34 74 Fax: +61 2 9901 1665
Email: kchan2++at++csc.com.au
This archive was generated by hypermail 2.0b2 on Thu Sep 09 1999 - 03:36:42 PDT