Board Logo

Problem with when depth > 1
ukmoths - 1/19/2006 at 11:30 PM


I'm having a problem with the method for items where the depth is greater than 1.

I'm using the code from openItemByCaption, with modification to select the found item.

It works fine if the item's n_depth is less than 2, but at depth 2 it returns the error 'Object doesn't support this property or method'.

I've also tried with the same results.

Am I missing something obvious?


rock - 1/20/2006 at 12:02 PM

Documented openItemByCaption function openes item's parent nodes before select it - so it should not cause the error. If you removed some functionality make sure the item is inited before call it's select method
//for v1.3
var o_state = o_item.state();
To init the item you should open all its parents. See API examples.

ukmoths - 1/21/2006 at 09:05 AM


I was selecting the item before the parent node was opened. I moved the select() call after this and now it's just fine!


Back to forum: