Jump to content

Group objects by some super-class


Recommended Posts

I am starting to cut my teeth on this scripting business. Many thanks already for the vast store of knowledge here. With some more time and experience, I may actually be able to contribute to this forum. Currently I just ready the posts and I am awed by all the Uber G Geeks here. :worship:

I have seen some posts about generating the class tree dynamically, and such. Rather than create the whole tree, is there a way to bring the current class to some level in the tree? (without the tree, I know... :rolleyes: ) Selection lists give an array of GObj references. These each can tell you their class name. I want to group objects that belong to a common super-class in the hierarchy.

The reason I ask is the only way I have imagined and implemented thus far is to cast these GObj references to the super-classes I am interested in and take the one that doesn't give an error. This might be fast, since some types are more common than others, but is there a more elegant way of doing this?

Thanks again,

David

Link to comment

After digging through PJM's Class Hierarchy builder, it seems that there is no such thing as a 'parent class' property. I like the scripting method for determining if a class inherits or not ("Find More Specific Classes"). That technique seems like it would work well.

It seems that if I dig through enough posted example codes I will find most of my answers. :book: Thanks for your inadvertent help, PJM.

David

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.