Problem with derived node kit in OI 2.1

Problem with derived node kit in OI 2.1

Post by Theodore W. Hal » Sat, 13 Jan 1996 04:00:00



In OpenInventor 2.1, a derived nodekit can't access it's own
private parts.  This did not seem to be a problem in 2.0.1

Here's a small test program:

//------------------------------------------
#include <Inventor/nodekits/SoBaseKit.h>
#include <Inventor/nodekits/SoSubKit.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoTransform.h>
#include <Inventor/Xt/SoXt.h>
#include <Inventor/SbBasic.h>
#include <stdio.h>

//----------
   class myKit : public SoBaseKit {

      SO_KIT_HEADER (myKit) ;
      SO_KIT_CATALOG_ENTRY_HEADER (topSeparator) ;

      public :

         static void initClass ()
         { SO_KIT_INIT_CLASS (myKit, SoBaseKit, "BaseKit") ; }

         myKit () ;

      private :

         ~myKit ()
         {}
   } ;

//---------
   SO_KIT_SOURCE (myKit) ;

//---------
   myKit::myKit ()
   {
      SO_KIT_CONSTRUCTOR (myKit) ;
      SO_KIT_ADD_CATALOG_ENTRY (
         topSeparator, SoSeparator, FALSE, this, , FALSE) ;
      SO_KIT_INIT_INSTANCE () ;

      SoSeparator *separator
         = (SoSeparator *) getPart ("topSeparator", TRUE) ;
      if (separator)
         separator->addChild (new SoTransform) ;
      else
         fprintf (stderr, "No access to my own private parts!\n") ;
   }

//----------
   void main (int, char **argv)
   {
      Widget widget = SoXt::init (argv[0]) ;
      myKit::initClass () ;
      myKit  *kit   = new myKit ;
   }

% setenv LD_LIBRARY_PATH /usr/lib/InventorDebug
% DCC -o testkit testkit.c++ -DIV_STRICT -lInventorXt
% testkit

Inventor error in SoNodekitParts::partIsPublicCheck(): can't return the part
topSeparator because it is not a public node in the nodekit's structure
returning NULL instead
No access to my own private parts!

--
Ted Hall                                       ^
Department of Architecture                    '-`
Chinese University of Hong Kong             '- - -`
Sha Tin, New Territories                 '- - - - - -`
HONG KONG                           \'- - - - - - - - - -`/

 
 
 

1. OI 2.1 Varsity update CD

Can someone tell me the varsity CD update number for Irix 5.3,
and whether it has been sent,  which contains OI 2.1?  I'm keen
to take advantage of some of the speed (and other) improvements
for some projects we have going ...

Geoff
--

What's an erl? And a werl?

2. reset canvas back to original bitmap?

3. Please help: problem in deriving new inventor node

4. PC Image Catalogers/Viewers with Keywords?

5. Announce - Image Processing Tool Kit rev 2.1

6. multitexturing

7. SuperVGA test kit release 2.1

8. Windows ICO files

9. Announce- Image Processing Tool Kit rev 2.1

10. Problem on creating new node kits

11. Extended Nodes -- cache misses in Inventor 2.1

12. Derived nodes and ivview

13. Open inventor derived shape node question...