Jump to content

No childclass possible


Recommended Posts

I have a problem with making a class a childclass from another. The parentclass is in a different order and different projekt folder then my childclass.

In the childclass project explorer I mark my childclass and select from the properties-Inherentance the parentclass. This works and with "Show class hirarchy" I can see that my class is now a childclass.

But when I open my parentclass project and look there the "Show class hirarchy" I can't see children classes neither with "Find->Children". Because of this my dynamic vi's don't work. What is the problem?thx!

Link to comment

The problem isn't with dynamic dispatching. If the child classes aren't showing up in the parent class project's class hierarchy, that means your child classes aren't being loaded into that application context. In other words, your parent class project doesn't have any child objects to take advantage of dynamic dispatching.

Link to comment

But when I open my parentclass project and look there the "Show class hirarchy" I can't see children classes neither with "Find->Children". Because of this my dynamic vi's don't work. What is the problem?thx!

Just add the Child Classes to that Project.

Link to comment

My question is "Why do want your Parent Class Project to see your Child Class?" Are you using the child class in the project? Do you just want to see what children are available? (If so, Why? and what if it's 100 children?) The structure is setup such that the Parent does not know about it's children unless they are actively loaded (i.e. used in the project). The Find->Children only works within the project context, if you were to do the same action in you child project on the parent class you would find the children

When you say,

Because of this my dynamic vi's don't work.

what do you mean? Which class are using? If you using the parent class then the Dynamic Dispatch will call the parent VI's. If you are using a child class then it will call child override VI's and you would see the child in hierarchy. If you could post some sample code or even screen shots that would help to solve your issue.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.