Jump to content

Unexplained inheritance errors


Recommended Posts

I have created a new class (B) which in inherits from class A. "A" has one "dynamic dispatch" member requiring over-ride, which I have already overridden. But still, the library gives me errors:

- Project Library Errors

This class does not implement at least one dynamic dispatch VI....

The parent of this LabView class is private and is not accessible from this class.

As far as I can determine, none of these statements are true. There are no VIs with * sign next to their name.

Please help me fix my project.

P.S. I have in the near past re-factored the library and removed some descendants of class A and the class name was different before. I suspect another case of internal inconsistency arising from left-over data. Is there a way to fix/clean-up my project?

Mike

Edited by mike5
Link to comment

Yes, class "A" is somehow broken, but I cannot determine how. I'd really like some recipe for fixing these type of errors that isn't "create a new class and re-implement everything from the old class".

If only there was a site where we could vent our frustration over the quality of this fine piece of software... Oh, wait!

:throwpc:

:frusty:

Link to comment

- Project Library Errors

This class does not implement at least one dynamic dispatch VI....

The parent of this LabView class is private and is not accessible from this class.

Hello Mike,

A descendant class cannot call a private VI from its parent class. If you've overridden the private VI, I guess the error is that you can't call the Parent implementation with "Call Parent Method" primitive in the Child.

If you have to call its parent implementation as part of the child's code, you should probably make both of them "Protected" instead of Private.

Link to comment

Hello Mike,

A descendant class cannot call a private VI from its parent class. If you've overridden the private VI, I guess the error is that you can't call the Parent implementation with "Call Parent Method" primitive in the Child.

If you have to call its parent implementation as part of the child's code, you should probably make both of them "Protected" instead of Private.

Thanks, I know that and both methods were protected.

I created a new class "A" and copied everything over hoping it will work out. It did (this time), and without LV crashing on me, too.

Best regards, Mike

Link to comment

Thanks, I know that and both methods were protected.

I created a new class "A" and copied everything over hoping it will work out. It did (this time), and without LV crashing on me, too.

Best regards, Mike

I agree those error messages are far from optimal to say the least. I've stuck my head a few times too.

Hopefully we'll see improvement in error documentation with LV2010...

Link to comment

I agree those error messages are far from optimal to say the least. I've stuck my head a few times too.

Hopefully we'll see improvement in error documentation with LV2010...

Thanks, you could also work on better class internal consistency control. I know I've had LV crash on me a couple of times simply as a result of renaming a member VI, removing a data from a control or VI from a class or renaming a VI or a class. And the crashes started occurring AFTER I fixed all the reported errors that were the result of my action...

Br, Mike

Link to comment

I came across something once - basically, if you change a parent class's VI's terminals from dynamic dispatch to non-dynamic dispatch (I used the right-click-replace) then that VI will no longer be overridden-able... however, if you had previously marked that VI as "Must be overridden" then you will find out that the "must overide" flag does not get reset. The end result is a VI that simultaneously must be overridden and cannot be overridden = broken class.

To fix it, replace the non dynamic dispatch with dynamic dispatch terminals, remove the "must overide" flag and start again.

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.