windrobin / papervision3d

Automatically exported from code.google.com/p/papervision3d
0 stars 0 forks source link

nullPointer in initVirtualMouse when View is added to stage with interactive=false #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a BasicView
2. set interactive to false
3. add the view in the displayList

What is the expected output? What do you see instead?
the call to handleAddedToStage leads to a nullPointer in initVirtualMouse

What version of the product are you using? On what operating system?
PaperVision 2.0, SVN revision : 815

Please provide any additional information below.
suggested fix : add 
"container.removeEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);"
in handleAddedToStage

related issues:
when using Flex effects, "handleAddedToStage" is called at the end of the 
effect (I could not determine exactly why), thus "handleEnterFrame" is 
registered twice, which is not a problem unless you destroy the BasicView. 
In that case, "handleEnterFrame" is still called with all data already 
released. The fix suggested above seems to be working for that as well

Original issue reported on code.google.com by preville...@gtempaccount.com on 5 Dec 2008 at 3:16

GoogleCodeExporter commented 9 years ago
the revision is 846

Original comment by p48l0.84...@gmail.com on 15 Dec 2008 at 11:00

GoogleCodeExporter commented 9 years ago
I'll have a look.

Original comment by neori...@gmail.com on 29 Dec 2008 at 4:54

GoogleCodeExporter commented 9 years ago
Thanks man, it's been added to InteractiveSceneManager

Original comment by neori...@gmail.com on 8 Mar 2009 at 6:46