Topia Posted October 10, 2011 Report Share Posted October 10, 2011 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! Quote Link to comment
Daklu Posted October 10, 2011 Report Share Posted October 10, 2011 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. Quote Link to comment
jgcode Posted October 11, 2011 Report Share Posted October 11, 2011 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. Quote Link to comment
Topia Posted October 11, 2011 Author Report Share Posted October 11, 2011 Just add the Child Classes to that Project. But how? With a right click an my parentclass there is no property point in the menu to make such a setting. Quote Link to comment
jgcode Posted October 11, 2011 Report Share Posted October 11, 2011 But how? With a right click an my parentclass there is no property point in the menu to make such a setting. Just drag and drop the Child Class that you want to use into the Project. Quote Link to comment
Ryan Podsim Posted October 11, 2011 Report Share Posted October 11, 2011 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.