TreeView and .GetName = ‘Unavailable’

LOL…Paul, that was very kind of you. Much obliged.

I gotta admit, I’m embarrassed at how complicated my code was compared to your rather clever, simple, and elegant method for filling the TreeView. I think I was at about 22 lines and that was just root plus one level, and you do it all in 9 lines with three locally dimensioned variables. Now that’s just artistic.

Thanks again for the help.

-Mel

Richard,

I spent most of today being driven nuts by 3DC when trying to populate a TreeView control for the latest version of my DarkBasic level exporter.

How come the ambient and directional lights are considered groups when they logically should be child objects of the Scene group? For some reason looping through .GetGroup(Index) returns the three default lights (ambient, directional 1, and directional 2) as groups rather than as andquot;objectsandquot;.

This kept crashing my plugin while populating the TreeView. When I suddenly discovered an extra brain cell lurking somewhere behind my cerebellum, I decided to put an andquot;On Error Resume Nextandquot; in my code, and suddenly it stopped crashing.

But then the lights showed up in the TreeView with the name andquot;Unavailableandquot; in their nodes’ Text property instead of the string returned by Group.GetName…

This is pretty bizarre behavior. Are those lights really supposed to count as groups instead of being child objects of the Scene root?

What I’m trying to do is mirror the hierarchy tree view in 3DC on my plugin’s form, without having to get all convoluted about it. Anybody successfully done this?

-Mel Ebbles

LOL, that’s a funny site…

-Mel

Great when it works <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

Knock knock. Who’s there? Recursion. Recursion who? Knock knock…. ;D

[img:11zu14m1]http&#58;//www&#46;badpuns&#46;com[/img:11zu14m1]
<!– m –><a class="postlink" href="http://www.badpuns.com">http://www.badpuns.com</a>&lt;!– m –>

Quote:
What I’m trying to do is mirror the hierarchy tree view in 3DC on my plugin’s form, without having to get all convoluted about it. Anybody successfully done this?

-Mel Ebbles

Hi Mel,

I’ve done something similar with a treeview – I’ll e-mail you the source code.

Paul

You must be logged in to reply in this thread.

5 posts