PDA

View Full Version : How far is this view from a specific ancestor view?


sagipolley
03-04-2006, 10:48 PM
Hi,

I have a tree-like structure that can be any number of levels deep (replicated, recursed).

My question is—for a specific subview, how can I find the ID of the instance of the class that is the root of the tree?

The root could be the current view's parent, parent.parent, parent.parent.parent, or whatever.

(I am trying to avoid referring to a specific instance of the class from within the class—if I do that, I can't reuse it...)

TIA,

Martin

jsundman
03-05-2006, 10:41 AM
I think classroot is what you're looking for. It's discussed in the Developer's Guide here:

http://www.laszlosystems.com/lps-3.1.1/docs/guide/class-inheritance.html#d0e16138

Thanks,

jrs

sagipolley
03-05-2006, 10:50 AM
Awesome! That is exactly what I was looking for.

Thank you so much!

Martin