Re: setScope() (instead of pfBuffer::merge() ?)

New Message Reply Date view Thread view Subject view Author view

Timothy Moore (moore++at++WOLFENET.com)
Wed, 28 Aug 1996 13:57:33 -0700 (PDT)


   From: jaf++at++chem.ucsd.edu (Jeremy Friesner)
   Date: Wed, 28 Aug 1996 13:11:55 -0700 (PDT)
   Content-Type: text

   Hi again all,

   I'm still working on database paging here; due the tricksy
   nature of pfBuffer::merge() under Performer 2.0, I'm attempting to do
   some limited paging without calling pfBuffer::merge().

Are you refering to the bugs inf pfBuffer::merge in 2.0, fixed in
2.0.1 and later? If not, it would be better to use pfBuffer::merge
and let Performer deal with the scope and messaging stuff that you've
gone and implemented yourself.

   In particular, I'm trying to use setScope() to move nodes from
   the DBASE pfBuffer to the main pfBuffer:

   ... in the DBASE process, I create a pfBuffer and addChild() a
       new pfGroup ("myGroup") into it. To myGroup I then add
       children which contain my new geometry.

       Then I setScope(myGroup, false) to remove that pfGroup
       from the dbase process's pfBuffer.

       Next the DBASE process sends a message to the APP process
       containing a pointer to myGroup. The DBASE process
       never accesses myGroup (or its children) afterwards.
       (i.e. myGroup is the responsibility of the APP process now)

   ... when the APP process receives the message, it does a
       pfGetCurBuffer()->setScope(myGroup,true) to add myGroup
       into the main Performer pfBuffer.

       Now the APP process should be able to do whatever it
       wants with the pfGroup; but it can't. :( If I try to
       pfPrint() the pfGroup, it only prints info on the root
       node and then dumps core (invalid memory address, blah blah).

Sounds like you didn't call setScope() on the child nodes.

       The reason for this, as far as I can tell, is that while
       myGroup->getNumChildren() still returns the correct number of
       children, myGroup->getChild() returns NULL for every child!

   And: The free bonus question! When I setScope() a node, does
        this affect just that pfNode(), or does it apply (recursively)
        to all children of that pfNode as well?

Just that pfNode.

Tim
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:26 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.