Sochettra / dynatree

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

Javascript Exception error when using .dynatree("destroy").dynatree(... ) on non-existant Tree. #152

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. $("#treeDataFolders").dynatree("destroy").dynatree(...
2.
3.

(If possible, please attach an example HTML file, that works when copied
into the dynatree/doc/ folder.)

What is the expected output? What do you see instead?

What version of the product are you using?
On what operating system and browser?

Latest production version: 0.5.4

Please provide any additional information below.
Love this Tree!

Some times I need to destroy a Tree and create a new one.
I've tried using the jQuery "chain" method: 
$("#treeDataFolders").dynatree("destroy").dynatree(... 

Unfortunately, this will give me an Javascript Exception error.
Possibly because it wants to destroy a Tree that doesn't exist.

So, could this be enhanced? At least don't throw an exception when
a non-existant Tree is being destroyed().

Thank you.
Jeffrey

Original issue reported on code.google.com by prana001 on 29 Sep 2010 at 5:28

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 1 Oct 2010 at 5:37

GoogleCodeExporter commented 8 years ago
(destroy is a method of the widget standard, not specific to dynatree.)
Does it happen with v1.0 also?
Could you put it into a try/catch block, to handle the 'tree does not exist' 
case?

Original comment by moo...@wwwendt.de on 8 Nov 2010 at 7:14

GoogleCodeExporter commented 8 years ago
No, it doesn't happen anymore with 1.0
Yes, a try{} catch handles this nicely, although I'm not found of those methods.

As far as I'm concerned you can close this one down also.

Thanks.

Original comment by prana001 on 9 Nov 2010 at 5:51

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 10 Nov 2010 at 6:25

GoogleCodeExporter commented 8 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:12