Chien Yang wrote:
> Sean and Justin,
>
>         I'm a little confuse on whether the NPE is on addChild() or
> setChild(). We did fix a bug reported by Justin in j3d1.3beta2 :
>
> BugId 4633672 : Group.setChild() may throw NullPointerException.

Hmmm.. That's interesting because I thought I reported it on the
addChild() not setChild(). Oh well, I could be wrong on that. :( I had
to remove the addChild() calls at the same time because it is pointless
having those when I can't setChild() as well so I may have missed a
secondary bug there.

Anyway, the basic process is that during the scene graph the process is
to addChild(null) as a placeholder for nodes that you want to add later.
Then, later on, you just do setChild(new_node_pointer, 0); The idea
behind this is that it is one less capability bit to need to switch on.
Instead of needing both write and extend, you just need write capabilities.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                               - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to