07-21-2024 05:25 PM
I really like the OpenGDS project. I played around with it for a while now and I have some things I am not sure about.
The interfaces I see in OpenGDS examples are actually GOOP classes. Is a GOOP4 class fully compatible with native LV interfaces?
Is it really necessary to have static Create methods? Can't a dynamic dispatch Create method just call the parent's Create method from it's own Create method?
Solved! Go to Solution.
07-26-2024 06:35 AM
@Quiztus2 wrote:The interfaces I see in OpenGDS examples are actually GOOP classes. Is a GOOP4 class fully compatible with native LV interfaces?
I use Interfaces with GOOP classes a lot and never had any problem. Why should they be?
07-27-2024 02:36 AM
Is it really necessary to have static Create methods? Can't a dynamic dispatch Create method just call the parent's Create method from it's own Create method?
What about the static named Create methods? Do you know the rational behind them?
07-28-2024 09:29 PM
Hi,
Those were added before NI added native interface support.
So you can ignore all those special Interface implementations.
We've removed the support for those special interface classes, but it looks like the examples is still there 🙂
07-28-2024 09:34 PM
The Create method have a name prefix of the class's name, to make sure it's unique.
That will prevent you from using, Call parent method.
In some framework you might like to use Call Parent Method, and then you just need to rename it to “Create.vi” only.
If you think about it, a constructor of a class often needs to use different connector panes.
Two child classes of a Logger-Base class (e.g. FileLogger, CloudLogger) you need different inputs to the create, that means you can’t use dynamic dispatch.
07-29-2024 01:28 AM
Thanks for clarification. Your project is amazing.